summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gsupplicant/supplicant.c10
-rwxr-xr-xsrc/network.c2
-rwxr-xr-xsrc/service.c10
3 files changed, 15 insertions, 7 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 49d391fe..5fedf023 100644
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -1657,7 +1657,6 @@ static void merge_network(GSupplicantNetwork *network)
GString *str;
const char *ssid, *mode, *key_mgmt;
#if defined TIZEN_EXT
- GSupplicantInterface *interface;
const char *isHS20AP;
const char *eap, *identity, *phase2;
#endif
@@ -1672,7 +1671,6 @@ static void merge_network(GSupplicantNetwork *network)
eap = g_hash_table_lookup(network->config_table, "eap");
identity = g_hash_table_lookup(network->config_table, "identity");
phase2 = g_hash_table_lookup(network->config_table, "phase2");
- interface = network->interface;
#endif
SUPPLICANT_DBG("ssid %s mode %s", ssid, mode);
@@ -1731,11 +1729,9 @@ static void merge_network(GSupplicantNetwork *network)
} else
network->isHS20AP = 0;
- if (interface)
- interface->network_path = g_strdup(network->path);
-
network->group = g_strdup(group);
callback_network_merged(network);
+ g_free(network->group);
#endif
g_free(group);
@@ -4918,6 +4914,10 @@ static void interface_add_network_result(const char *error,
SUPPLICANT_DBG("PATH: %s", path);
+#if defined TIZEN_EXT
+ if (interface->network_path)
+ g_free(interface->network_path);
+#endif
interface->network_path = g_strdup(path);
store_network_information(interface, data->ssid);
diff --git a/src/network.c b/src/network.c
index c5b5c974..e189955c 100755
--- a/src/network.c
+++ b/src/network.c
@@ -2105,6 +2105,7 @@ unsigned char *connman_network_get_countrycode(struct connman_network *network)
int connman_network_set_bssid_list(struct connman_network *network,
GSList *bssids)
{
+ g_slist_free_full(network->wifi.bssid_list, g_free);
network->wifi.bssid_list = bssids;
return 0;
@@ -2439,6 +2440,7 @@ bool connman_network_get_bool(struct connman_network *network,
*/
void connman_network_set_vsie_list(struct connman_network *network, GSList *vsie_list)
{
+ g_slist_free_full(network->wifi.vsie_list, g_free);
network->wifi.vsie_list = vsie_list;
}
diff --git a/src/service.c b/src/service.c
index b0424618..cf8ccaac 100755
--- a/src/service.c
+++ b/src/service.c
@@ -786,11 +786,17 @@ static int service_load(struct connman_service *service)
dns_method = g_key_file_get_string(keyfile, service->identifier,
"Nameservers.IPv4method", NULL);
- service->dns_config_method_ipv4 = __connman_dnsconfig_string2method(dns_method);
+ if (dns_method) {
+ service->dns_config_method_ipv4 = __connman_dnsconfig_string2method(dns_method);
+ g_free(dns_method);
+ }
dns_method = g_key_file_get_string(keyfile, service->identifier,
"Nameservers.IPv6method", NULL);
- service->dns_config_method_ipv6 = __connman_dnsconfig_string2method(dns_method);
+ if (dns_method) {
+ service->dns_config_method_ipv6 = __connman_dnsconfig_string2method(dns_method);
+ g_free(dns_method);
+ }
#endif
service->timeservers_config = g_key_file_get_string_list(keyfile,