huawei: Fix stale PCUI channel after hot-unplug
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 29 Jul 2011 13:12:59 +0000 (15:12 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 29 Jul 2011 13:20:53 +0000 (15:20 +0200)
plugins/huawei.c

index 888f63b..1380369 100644 (file)
@@ -104,6 +104,9 @@ static void huawei_remove(struct ofono_modem *modem)
 
        ofono_modem_set_data(modem, NULL);
 
+       /* Cleanup after hot-unplug */
+       g_at_chat_unref(data->pcui);
+
        g_free(data);
 }