ofono: Check for info pointer in set_active_reply
authorMohamed Abbas <mabbas@linux.intel.com>
Tue, 29 Mar 2011 22:20:03 +0000 (15:20 -0700)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 30 Mar 2011 10:07:42 +0000 (12:07 +0200)
When ofono_disconnect() is being called before receiving the set_active()
reply back, info will be NULL.

Fixes BMC#14518

plugins/ofono.c

index 3e71441..f126de9 100644 (file)
@@ -446,10 +446,13 @@ static void set_active_reply(DBusPendingCall *call, void *user_data)
 
        info = g_hash_table_lookup(network_hash, path);
 
-       DBG("path %s network %p", path, info->network);
-
        reply = dbus_pending_call_steal_reply(call);
 
+       if (info == NULL)
+               goto done;
+
+       DBG("path %s network %p", path, info->network);
+
        if (!pending_network_is_available(info->network))
                goto done;