nl80211: Free BSS structure even if netdev does not exists
It is possible for a vif netdev to be removed by something else than hostapd and if that happens for a virtual AP interface, if_remove() handler should still free the local data structure to avoid memory leaks if something external removes a netdev. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
41cc50d19e
commit
2b72df6374
1 changed files with 2 additions and 4 deletions
|
@ -9251,9 +9251,7 @@ static int wpa_driver_nl80211_if_remove(struct i802_bss *bss,
|
|||
|
||||
wpa_printf(MSG_DEBUG, "nl80211: %s(type=%d ifname=%s) ifindex=%d",
|
||||
__func__, type, ifname, ifindex);
|
||||
if (ifindex <= 0)
|
||||
return -1;
|
||||
|
||||
if (ifindex > 0)
|
||||
nl80211_remove_iface(drv, ifindex);
|
||||
|
||||
#ifdef HOSTAPD
|
||||
|
|
Loading…
Reference in a new issue