P2P: Deinit GO group data before global P2P deinit
This avoids issues with using freed memory in p2p_group_deinit().
This commit is contained in:
parent
f8d0131a11
commit
743ef79914
1 changed files with 9 additions and 0 deletions
|
@ -2268,6 +2268,15 @@ void wpas_p2p_deinit_global(struct wpa_global *global)
|
||||||
os_free(ifname);
|
os_free(ifname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Deinit GO data on any possibly remaining interface (if main
|
||||||
|
* interface is used as GO).
|
||||||
|
*/
|
||||||
|
for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) {
|
||||||
|
if (wpa_s->ap_iface)
|
||||||
|
wpas_p2p_group_deinit(wpa_s);
|
||||||
|
}
|
||||||
|
|
||||||
p2p_deinit(global->p2p);
|
p2p_deinit(global->p2p);
|
||||||
global->p2p = NULL;
|
global->p2p = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue