]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Flush services based on global p2p init and not p2p ifaces
authorEduardo Abinader <eduardo.abinader@openbossa.org>
Sat, 20 Sep 2014 20:51:00 +0000 (16:51 -0400)
committerJouni Malinen <j@w1.fi>
Sun, 28 Sep 2014 08:03:48 +0000 (11:03 +0300)
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>
wpa_supplicant/p2p_supplicant.c

index e1a384b93a0b71e117f318132339308a0b2cba09..c64665ddb6f319e0db2fc1ae876a282a6ffd3c13 100644 (file)
@@ -4077,8 +4077,8 @@ static void wpas_p2p_deinit_global(struct wpa_global *global)
        struct wpa_supplicant *wpa_s, *tmp;
 
        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)
                return;