summaryrefslogtreecommitdiffstats
path: root/drivers/atmodem/call-settings.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atmodem/call-settings.c')
-rw-r--r--drivers/atmodem/call-settings.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/atmodem/call-settings.c b/drivers/atmodem/call-settings.c
index 2a3ec42e..ef9ff23d 100644
--- a/drivers/atmodem/call-settings.c
+++ b/drivers/atmodem/call-settings.c
@@ -339,7 +339,7 @@ static int at_call_settings_probe(struct ofono_call_settings *cs,
{
GAtChat *chat = data;
- ofono_call_settings_set_data(cs, chat);
+ ofono_call_settings_set_data(cs, g_at_chat_clone(chat));
g_idle_add(at_call_settings_register, cs);
return 0;
@@ -347,6 +347,10 @@ static int at_call_settings_probe(struct ofono_call_settings *cs,
static void at_call_settings_remove(struct ofono_call_settings *cs)
{
+ GAtChat *chat = ofono_call_settings_get_data(cs);
+
+ g_at_chat_unref(chat);
+ ofono_call_settings_set_data(cs, NULL);
}
static struct ofono_call_settings_driver driver = {