Fix derefrencing of invalid pointer
[platform/upstream/connman.git] / src / network.c
index 7046137..3bf6299 100755 (executable)
@@ -1350,6 +1350,7 @@ static void network_destruct(struct connman_network *network)
 #if defined TIZEN_EXT
        g_slist_free_full(network->wifi.vsie_list, g_free);
        g_slist_free_full(network->wifi.bssid_list, g_free);
+       g_hash_table_destroy(network->wifi.assoc_reject_table);
 #endif
        g_free(network->path);
        g_free(network->group);
@@ -2668,6 +2669,8 @@ void connman_network_set_assoc_reject_table(struct connman_network *network,
        if (!assoc_reject_table)
                return;
 
+       g_hash_table_destroy(network->wifi.assoc_reject_table);
+
        network->wifi.assoc_reject_table = assoc_reject_table;
 }