]> git.ipfire.org Git - thirdparty/hostap.git/commit
Move NULL check for driver private data (drv_priv)
authorSunil Ravi <sunilravi@google.com>
Thu, 18 Jul 2024 23:10:46 +0000 (23:10 +0000)
committerJouni Malinen <j@w1.fi>
Sat, 20 Jul 2024 17:14:08 +0000 (20:14 +0300)
commited5887a8c9d372c66613e7fff6d033a2496ec6de
tree11d3facafdbdc3e3eb28c7eea9ac92e75d3a97ed
parentc3d305d9395b9f6287800a2bdde91b440a985a35
Move NULL check for driver private data (drv_priv)

In the hostapd_cleanup_driver() function, the NULL check for the driver
private data (drv_priv) is located within the CONFIG_IEEE80211BE feature
flag. As a result, on platforms where CONFIG_IEEE80211BE is not defined,
driver->hapd_deinit(drv_priv) is called with drv_priv set to NULL. This
leads to a null pointer exception in wpa_driver_nl80211_deinit().

To address this issue, move the NULL check for drv_priv outside the
CONFIG_IEEE80211BE build flag. This ensures that the check is performed
regardless of the value of CONFIG_IEEE80211BE, preventing the NULL
pointer exception.

Fixes: df34c2ced34f ("AP MLD: De-initialize/disable link BSS properly")
Signed-off-by: Sunil Ravi <sunilravi@google.com>
src/ap/hostapd.c