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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2021-03-06 11:56:00 +02:00
parent b54410127d
commit 7c5442e744

View 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);