[PATCH 10/12] mesh: Cancel remaining timers to avoid segmentation fault

Masashi Honma masashi.honma
Mon Nov 3 21:36:51 PST 2014


Signed-off-by: Natsuki Itaya <Natsuki.Itaya at jp.sony.com>
Signed-off-by: Masashi Honma <masashi.honma at gmail.com>
---
 wpa_supplicant/mesh_mpm.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/wpa_supplicant/mesh_mpm.c b/wpa_supplicant/mesh_mpm.c
index 32c73a6..4f86578 100644
--- a/wpa_supplicant/mesh_mpm.c
+++ b/wpa_supplicant/mesh_mpm.c
@@ -465,6 +465,16 @@ int mesh_mpm_plink_close(struct hostapd_data *hapd,
 void mesh_mpm_deinit(struct wpa_supplicant *wpa_s, struct hostapd_iface *ifmsh)
 {
 	struct hostapd_data *hapd = ifmsh->bss[0];
+	struct sta_info *sta;
+
+	sta = hapd->sta_list;
+
+	while (sta) {
+		eloop_cancel_timeout(plink_timer, wpa_s, sta);
+		wpa_printf(MSG_DEBUG, "Canceling plink_timer " MACSTR,
+			   MAC2STR(sta->addr));
+		sta = sta->next;
+	}
 
 	/* notify peers we're leaving */
 	ap_for_each_sta(hapd, mesh_mpm_plink_close, wpa_s);
-- 
1.9.1




More information about the Hostap mailing list