nl80211: Fix AP deinit path in error cases

If the interface initialization fails, no links might be set when
calling the deinit functions. Those functions need to be prepared for
bss->flink being NULL.

Fixes: 47269be36e ("nl80211: Refactor i802_bss to support multiple links")
Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2023-12-22 10:57:04 +02:00
parent 2ae3c61678
commit 6c3438eef6

View file

@ -6135,6 +6135,7 @@ static void nl80211_teardown_ap(struct i802_bss *bss)
nl80211_mgmt_unsubscribe(bss, "AP teardown");
nl80211_put_wiphy_data_ap(bss);
if (bss->flink)
bss->flink->beacon_set = 0;
}