diff mbox series

[2/2] wifi: mac80211: mlme: release deflink channel in error case

Message ID 20220902161058.c6e40e0c38c1.I97c1d24d4f526d3d5e41398a2a56de7255f725c2@changeid (mailing list archive)
State Accepted
Delegated to: Johannes Berg
Headers show
Series [1/2] wifi: mac80211: fix locking in auth/assoc timeout | expand

Commit Message

Johannes Berg Sept. 2, 2022, 2:11 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

In the prep_channel error case we didn't release the deflink
channel leaving it to be left around. Fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/mlme.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 4555d23b009e..13d075e6a318 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -6549,6 +6549,7 @@  static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
 	return 0;
 
 out_err:
+	ieee80211_link_release_channel(&sdata->deflink);
 	ieee80211_vif_set_links(sdata, 0);
 	return err;
 }