]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
hostapd: Fix couple of deinit path cases to clear pointers
authorJouni Malinen <jouni@qca.qualcomm.com>
Wed, 25 Sep 2013 15:14:13 +0000 (18:14 +0300)
committerJouni Malinen <j@w1.fi>
Wed, 25 Sep 2013 15:14:13 +0000 (18:14 +0300)
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 <jouni@qca.qualcomm.com>

src/ap/vlan_init.c
src/ap/wpa_auth_glue.c

index 746af40c18abc5f512db3efd4008d112ad9e9a5d..1afbb8ec9e8bcbe7b21dee23458a65943abc46f1 100644 (file)
@@ -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 */
 }
 
index d977b42fe9061c4704b1095af5f4e1317cf390e1..cbaab9f0934004ce14becd21a960ec3184eb1d7c 100644 (file)
@@ -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 */
 }