]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Clear hapd->gas pointer on deinit
authorJouni Malinen <j@w1.fi>
Sat, 6 Mar 2021 09:56:00 +0000 (11:56 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Mar 2021 09:56:00 +0000 (11:56 +0200)
While it does not look like the stale pointer could have been
dereferenced in practice, it is better not to leave the stale pointer to
freed memory in place to avoid accidental uses.

Signed-off-by: Jouni Malinen <j@w1.fi>
src/ap/hostapd.c

index 8892a7a0c423aea979ee2456f9daadc054683933..7bb0f097669bb36d4990cacfb2bb119f0ca60ba8 100644 (file)
@@ -392,6 +392,7 @@ void hostapd_free_hapd_data(struct hostapd_data *hapd)
 #ifdef CONFIG_DPP
        hostapd_dpp_deinit(hapd);
        gas_query_ap_deinit(hapd->gas);
+       hapd->gas = NULL;
 #endif /* CONFIG_DPP */
 
        authsrv_deinit(hapd);