summaryrefslogtreecommitdiffstats
path: root/drivers/stemodem/gprs-context.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/stemodem/gprs-context.c')
-rw-r--r--drivers/stemodem/gprs-context.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/stemodem/gprs-context.c b/drivers/stemodem/gprs-context.c
index 7ac07c97..ace9d6e9 100644
--- a/drivers/stemodem/gprs-context.c
+++ b/drivers/stemodem/gprs-context.c
@@ -512,7 +512,7 @@ static int ste_gprs_context_probe(struct ofono_gprs_context *gc,
int i;
gcd = g_new0(struct gprs_context_data, 1);
- gcd->chat = chat;
+ gcd->chat = g_at_chat_clone(chat);
g_at_chat_register(gcd->chat, "+CGEV:", cgev_notify, FALSE, gc, NULL);
@@ -536,6 +536,8 @@ static void ste_gprs_context_remove(struct ofono_gprs_context *gc)
g_caif_devices = NULL;
ofono_gprs_context_set_data(gc, NULL);
+
+ g_at_chat_unref(gcd->chat);
g_free(gcd);
}