Commit 61934257 authored by Slava Monich's avatar Slava Monich

Merge branch 'wifi-dontcrash' into 'master'

Clear wifi_bss -> wifi_network pointers when wifi_network us being deleted

See merge request mer-core/connman!277
parents c4ac4802 15a3407d
......@@ -652,6 +652,11 @@ static void wifi_bss_destroy(gpointer value)
wifi_bss_free(value);
}
static void wifi_bss_clear_net(gpointer value)
{
((struct wifi_bss *)value)->net = NULL;
}
static gboolean wifi_bss_ident_update(struct wifi_bss *bss_data)
{
if (bss_data) {
......@@ -1757,7 +1762,7 @@ static void wifi_network_delete(struct wifi_network *net)
connman_network_unref(net->network);
gsupplicant_bss_unref(net->connecting_to);
gsupplicant_bss_unref(net->current_bss);
g_slist_free(net->bss_list);
g_slist_free_full(net->bss_list, wifi_bss_clear_net);
g_free(net->ident);
g_free(net->last_passphrase);
g_slice_free(struct wifi_network, net);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment