summaryrefslogtreecommitdiffstats
path: root/drivers/calypsomodem/stk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/calypsomodem/stk.c')
-rw-r--r--drivers/calypsomodem/stk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/calypsomodem/stk.c b/drivers/calypsomodem/stk.c
index e63a81ff..acee5c37 100644
--- a/drivers/calypsomodem/stk.c
+++ b/drivers/calypsomodem/stk.c
@@ -235,7 +235,7 @@ static int calypso_stk_probe(struct ofono_stk *stk,
struct stk_data *sd;
sd = g_new0(struct stk_data, 1);
- sd->chat = chat;
+ sd->chat = g_at_chat_clone(chat);
ofono_stk_set_data(stk, sd);
@@ -260,6 +260,7 @@ static void calypso_stk_remove(struct ofono_stk *stk)
ofono_stk_set_data(stk, NULL);
+ g_at_chat_unref(sd->chat);
g_free(sd);
}