summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/huawei.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/huawei.c b/plugins/huawei.c
index 72298fb2..50db2c5b 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -70,6 +70,7 @@ static void huawei_remove(struct ofono_modem *modem)
ofono_modem_set_data(modem, NULL);
+ g_at_chat_unref(data->chat);
g_free(data);
}
@@ -150,6 +151,8 @@ static int huawei_disable(struct ofono_modem *modem)
if (!data->chat)
return 0;
+ g_at_chat_cancel_all(data->chat);
+ g_at_chat_unregister_all(data->chat);
g_at_chat_send(data->chat, "AT+CFUN=0", NULL,
cfun_disable, modem, NULL);