From: Jouni Malinen Date: Sat, 6 Mar 2021 09:56:00 +0000 (+0200) Subject: DPP: Clear hapd->gas pointer on deinit X-Git-Tag: hostap_2_10~474 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c5442e744e7188e691f41f7c543d5a37dbb16d1;p=thirdparty%2Fhostap.git DPP: Clear hapd->gas pointer on deinit 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 --- diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c index 8892a7a0c..7bb0f0976 100644 --- a/src/ap/hostapd.c +++ b/src/ap/hostapd.c @@ -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);