gsupplicant: Fixing a possible memory leak when disconnecting
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Mon, 7 May 2012 07:21:26 +0000 (10:21 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 8 May 2012 09:17:41 +0000 (12:17 +0300)
gsupplicant/supplicant.c

index 867fa02..2c1a928 100644 (file)
@@ -3446,8 +3446,10 @@ static void interface_disconnect_result(const char *error,
        /* If we are disconnecting from previous WPS successful
         * association. i.e.: it did not went through AddNetwork,
         * and interface->network_path was never set. */
-       if (data->interface->network_path == NULL)
+       if (data->interface->network_path == NULL) {
+               dbus_free(data);
                return;
+       }
 
        network_remove(data);
 }