---
gsupplicant/supplicant.c | 2 ++
plugins/wifi.c | 10 +++++++---
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 8452656..39302d7 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -2115,6 +2115,7 @@ static void interface_select_network_result(const char
*error,
SUPPLICANT_DBG("");
+ g_free(data->ssid);
dbus_free(data);
}
@@ -2157,6 +2158,7 @@ static void interface_add_network_result(const char
*error,
error:
g_free(interface->network_path);
interface->network_path = NULL;
+ g_free(data->ssid);
g_free(data);
}
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 62d9216..98f2225 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -645,27 +645,31 @@ static int network_connect(struct connman_network
*network)
struct connman_device *device = connman_network_get_device(network);
struct wifi_data *wifi;
GSupplicantInterface *interface;
- GSupplicantSSID ssid;
+ GSupplicantSSID *ssid;
DBG("network %p", network);
if (device == NULL)
return -ENODEV;
+ ssid = g_malloc0(sizeof(GSupplicantSSID));
+ if (ssid == NULL)
+ return -ENOMEM;
+
wifi = connman_device_get_data(device);
if (wifi == NULL)
return -ENODEV;
interface = wifi->interface;
- ssid_init(&ssid, network);
+ ssid_init(ssid, network);
if (wifi->disconnecting == TRUE)
wifi->pending_network = connman_network_ref(network);
else {
wifi->network = connman_network_ref(network);
- return g_supplicant_interface_connect(interface, &ssid,
+ return g_supplicant_interface_connect(interface, ssid,
connect_callback, NULL);
}
--
1.7.2.3
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman