From 66f4dd155043f3837b898c21acb9252699a92bcd Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 25 Sep 2013 18:14:13 +0300 Subject: [PATCH] hostapd: Fix couple of deinit path cases to clear pointers This fixes some issues where dynamic interface enable/disable cycles could end up trying to free resources twice and crash the process while doing so. Signed-hostap: Jouni Malinen --- src/ap/vlan_init.c | 1 + src/ap/wpa_auth_glue.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c index 746af40c1..1afbb8ec9 100644 --- a/src/ap/vlan_init.c +++ b/src/ap/vlan_init.c @@ -1021,6 +1021,7 @@ void vlan_deinit(struct hostapd_data *hapd) #ifdef CONFIG_FULL_DYNAMIC_VLAN full_dynamic_vlan_deinit(hapd->full_dynamic_vlan); + hapd->full_dynamic_vlan = NULL; #endif /* CONFIG_FULL_DYNAMIC_VLAN */ } diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c index d977b42fe..cbaab9f09 100644 --- a/src/ap/wpa_auth_glue.c +++ b/src/ap/wpa_auth_glue.c @@ -618,5 +618,6 @@ void hostapd_deinit_wpa(struct hostapd_data *hapd) #ifdef CONFIG_IEEE80211R l2_packet_deinit(hapd->l2); + hapd->l2 = NULL; #endif /* CONFIG_IEEE80211R */ }