libnm-glib: fix crash due to uninitalized pointer in get_permissions_reply()
authorThomas Haller <thaller@redhat.com>
Tue, 26 Jan 2016 11:00:14 +0000 (12:00 +0100)
committerThomas Haller <thaller@redhat.com>
Tue, 26 Jan 2016 11:04:08 +0000 (12:04 +0100)
If the D-Bus call failed with error, @permissions would stay uninitialized.

libnm-glib/nm-client.c

index 9d1f907..468b06d 100644 (file)
@@ -336,7 +336,7 @@ get_permissions_reply (DBusGProxy *proxy,
                        gpointer user_data)
 {
        NMClient *self = NM_CLIENT (user_data);
-       GHashTable *permissions;
+       GHashTable *permissions = NULL;
        GError *error = NULL;
 
        dbus_g_proxy_end_call (proxy, call, &error,