P2P: Flush services based on global p2p init and not p2p ifaces
As P2P service are not necessarily attached to a iface, when added, proceed with same approach on p2p global deinit. Such approach solves memory leaks ocurring upon wpa_supplicant termination, when p2p services were registered previously. Signed-off-by: Eduardo Abinader <eduardo.abinader@openbossa.org>
This commit is contained in:
parent
7139cf4a4f
commit
ee285df457
1 changed files with 2 additions and 2 deletions
|
@ -4077,8 +4077,8 @@ static void wpas_p2p_deinit_global(struct wpa_global *global)
|
||||||
struct wpa_supplicant *wpa_s, *tmp;
|
struct wpa_supplicant *wpa_s, *tmp;
|
||||||
|
|
||||||
wpa_s = global->ifaces;
|
wpa_s = global->ifaces;
|
||||||
if (wpa_s)
|
|
||||||
wpas_p2p_service_flush(wpa_s);
|
wpas_p2p_service_flush(global->p2p_init_wpa_s);
|
||||||
|
|
||||||
if (global->p2p == NULL)
|
if (global->p2p == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue