aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/notify.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2014-12-27 19:00:11 (GMT)
committerJouni Malinen <j@w1.fi>2014-12-29 13:49:05 (GMT)
commit5f136bc126f2ee34f0d49921815c2efdb539aeae (patch)
tree9c681b6284acd2b4956759a87e7e8312dc8cf70e /wpa_supplicant/notify.c
parentd20be3a7396ed3cb52f6dfd39ffd8bb09c69d9d8 (diff)
downloadhostap-5f136bc126f2ee34f0d49921815c2efdb539aeae.zip
hostap-5f136bc126f2ee34f0d49921815c2efdb539aeae.tar.gz
hostap-5f136bc126f2ee34f0d49921815c2efdb539aeae.tar.bz2
D-Bus: Fix P2P persistent group removal from non-D-Bus triggers
It is possible for the persistent group object to be added and removed by non-D-Bus triggers (e.g., ctrl_iface commands). The add part was already handled, but removal was not. That resulted in memory leaks when a P2P persistent group was removed without using an explicit D-Bus command for this even if the object was added without D-Bus involvement. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/notify.c')
-rw-r--r--wpa_supplicant/notify.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index de33019..df1ce9e 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -316,6 +316,9 @@ void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
if (!ssid->p2p_group && wpa_s->global->p2p_group_formation != wpa_s)
wpas_dbus_unregister_network(wpa_s, ssid->id);
+ if (network_is_persistent_group(ssid))
+ wpas_notify_persistent_group_removed(wpa_s, ssid);
+
wpas_p2p_network_removed(wpa_s, ssid);
}