aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
authorAmit Khatri <amit7861234@gmail.com>2019-01-03 15:47:26 (GMT)
committerJouni Malinen <j@w1.fi>2019-01-04 11:19:12 (GMT)
commit69dc9cabccb9c72b910bc123831324e6ae59d165 (patch)
tree4bfa756a04cd4080577bbcf4984bb007662e1bf6 /wpa_supplicant
parentebf25480bb32b4aa5cea23d7dd5afed9d69e85c1 (diff)
downloadhostap-69dc9cabccb9c72b910bc123831324e6ae59d165.zip
hostap-69dc9cabccb9c72b910bc123831324e6ae59d165.tar.gz
hostap-69dc9cabccb9c72b910bc123831324e6ae59d165.tar.bz2
P2PS: Notify D-Bus about removal of a stale persistent group
During P2PS PD Request processing wpa_supplicant removes stale persistent groups, but it did not notify D-Bus to unregister object. This can result in leaving behind objects pointing to freed memory and memory leaks. Sometime it can cause a crash in wpa_config_get_all() function and DBUS_ERROR_OBJECT_PATH_IN_USE errors. Fix this by adding the missed notification to D-Bus code to unregister the object. Signed-off-by: Amit Khatri <amit7861234@gmail.com>
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/p2p_supplicant.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c
index 3049894..88eb4e0 100644
--- a/wpa_supplicant/p2p_supplicant.c
+++ b/wpa_supplicant/p2p_supplicant.c
@@ -3918,6 +3918,10 @@ static int wpas_remove_stale_groups(void *ctx, const u8 *peer, const u8 *go,
/* Remove stale persistent group */
if (s->mode != WPAS_MODE_P2P_GO || s->num_p2p_clients <= 1) {
+ wpa_dbg(wpa_s, MSG_DEBUG,
+ "P2P: Remove stale persistent group id=%d",
+ s->id);
+ wpas_notify_persistent_group_removed(wpa_s, s);
wpa_config_remove_network(wpa_s->conf, s->id);
save_config = 1;
continue;