From: Yu A Wang <[email protected]>

---
 plugins/ofono.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index ea4692f..2bf777d 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -1596,12 +1596,15 @@ static void ofono_disconnect(DBusConnection 
*connection, void *user_data)
 {
        DBG("connection %p", connection);
 
-       if (modem_hash == NULL)
-               return;
-
-       g_hash_table_destroy(modem_hash);
+       if (modem_hash != NULL) {
+               g_hash_table_destroy(modem_hash);
+               modem_hash = NULL;
+       }
 
-       modem_hash = NULL;
+       if (network_hash != NULL) {
+               g_hash_table_destroy(network_hash);
+               network_hash = NULL;
+       }
 }
 
 static gboolean modem_changed(DBusConnection *connection, DBusMessage *message,
-- 
1.7.2.2

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to