diff options
Diffstat (limited to 'drivers/atmodem/ussd.c')
-rw-r--r-- | drivers/atmodem/ussd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index 555ce134..055b11f8 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -224,6 +224,7 @@ static int at_ussd_probe(struct ofono_ussd *ussd, unsigned int vendor, { GAtChat *chat = data; + chat = g_at_chat_clone(chat); ofono_ussd_set_data(ussd, chat); g_at_chat_send(chat, "AT+CUSD=1", NULL, at_ussd_register, ussd, NULL); @@ -233,6 +234,10 @@ static int at_ussd_probe(struct ofono_ussd *ussd, unsigned int vendor, static void at_ussd_remove(struct ofono_ussd *ussd) { + GAtChat *chat = ofono_ussd_get_data(ussd); + + g_at_chat_unref(chat); + ofono_ussd_set_data(ussd, NULL); } static struct ofono_ussd_driver driver = { |