gsupplicant network_path not freed while removing interface
[framework/connectivity/connman.git] / gsupplicant / supplicant.c
index 934ad1c..cc32d56 100644 (file)
@@ -406,6 +406,7 @@ static void remove_interface(gpointer data)
        callback_interface_removed(interface);
 
        g_free(interface->path);
+       g_free(interface->network_path);
        g_free(interface->ifname);
        g_free(interface->driver);
        g_free(interface->bridge);
@@ -1882,7 +1883,7 @@ static void interface_get_result(const char *error,
        SUPPLICANT_DBG("");
 
        if (error != NULL) {
-               g_warning("error %s", error);
+               SUPPLICANT_DBG("Interface not created yet");
                err = -EIO;
                goto create;
        }
@@ -2472,10 +2473,8 @@ static void interface_disconnect_result(const char *error,
 
        SUPPLICANT_DBG("");
 
-       if (error != NULL && data->callback != NULL) {
+       if (error != NULL && data->callback != NULL)
                data->callback(-EIO, data->interface, data->user_data);
-               return;
-       }
 
        network_remove(data);
 }