hostapd: Make sure hapd->drv_priv gets cleared on driver deinit
authorJouni Malinen <j@w1.fi>
Sat, 31 May 2014 14:11:04 +0000 (17:11 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 31 May 2014 14:11:04 +0000 (17:11 +0300)
commitd92bdf96028e4f3ed115d5e1055be7061923f7f4
tree715335526ffba95f2a80bb2c985ca98e1538816b
parent438e13339d99aa9d6ce282ee4d81a2b4b2e86f9b
hostapd: Make sure hapd->drv_priv gets cleared on driver deinit

Couple of code paths in hostapd.c could have left hapd->drv_priv
pointing to memory that was freed in driver_nl80211.c when a secondary
BSS interface is removed. This could result in use of freed memory and
segfault when the next driver operation (likely during interface
deinit/removal). Fix this by clearing hapd->drv_priv when there is
reason to believe that the old value is not valid within the driver
wrapper anymore.

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