Skip to contentSkip to conversation

wifi: nl80211: fix BSS reference leak

PATCH New Johannes Berg 1 participant 1 message Oct 10 802.11 (including cfg80211/NL80211)

lore
Share & tools
lore

Johannes Berg

author maintainer
#0 lore raw

PATCH 1/1 wifi: nl80211: fix BSS reference leak

From: Johannes Berg <[email protected]>

In case nl80211_process_links() returns an error during a multi-link reconfiguration request, BSS entries might leak (if it already has one but fails on a further link). Fix it by jumping to the out label that handles this.

---
 net/wireless/nl80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/wireless/nl80211.c +1 -1
index a48bd4e4f4c7..98db2461b541 100644
@@ -19559,7 +19559,7 @@ static int nl80211_assoc_ml_reconf(struct sk_buff *skb, struct genl_info *info)
 					    IEEE80211_MLD_MAX_NUM_LINKS,
 					    NULL, 0, info);
 		if (err)
-			return err;
+			goto out;
 
 		for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS;
 		     link_id++) {
Signature · 1 line
2.56.0