From: Jouni Malinen Date: Wed, 25 Sep 2013 15:14:13 +0000 (+0300) Subject: hostapd: Fix couple of deinit path cases to clear pointers X-Git-Tag: hostap_2_1~923 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66f4dd155043f3837b898c21acb9252699a92bcd;p=thirdparty%2Fhostap.git 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 --- 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 */ }