From 43ef227e90b34aac9c1c363832fe93d46f32e221 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 1 Oct 2020 15:44:19 +0300 Subject: [PATCH] P2P: Make use wpas_p2p_reconsider_moving_go timeout gets canceled The per-interface P2P data freeing function did not cover this eloop timeout that could potentially have been registered. Explicitly cancel this timeout to make sure no references to freed memory can remain in such a case. Signed-off-by: Jouni Malinen --- wpa_supplicant/p2p_supplicant.c | 1 + 1 file changed, 1 insertion(+) diff --git a/wpa_supplicant/p2p_supplicant.c b/wpa_supplicant/p2p_supplicant.c index 36fb05557..1fbe15a5b 100644 --- a/wpa_supplicant/p2p_supplicant.c +++ b/wpa_supplicant/p2p_supplicant.c @@ -4776,6 +4776,7 @@ void wpas_p2p_deinit(struct wpa_supplicant *wpa_s) eloop_cancel_timeout(wpas_p2p_group_idle_timeout, wpa_s, NULL); wpas_p2p_remove_pending_group_interface(wpa_s); eloop_cancel_timeout(wpas_p2p_group_freq_conflict, wpa_s, NULL); + eloop_cancel_timeout(wpas_p2p_reconsider_moving_go, wpa_s, NULL); wpas_p2p_listen_work_done(wpa_s); if (wpa_s->p2p_send_action_work) { os_free(wpa_s->p2p_send_action_work->ctx);