Commit bc7a39b4 authored by Luca Coelho's avatar Luca Coelho Committed by Johannes Berg

nl80211: don't return err unconditionally in nl80211_start_ap()

When a memory leak was fixed, a return err was changed to goto err,
but, accidentally, the if (err) was removed, so now we always exit at
this point.

Fix it by adding if (err) back.

Fixes: 9951ebfc ("nl80211: fix potential leak in AP start")
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20200626124931.871ba5b31eee.I97340172d92164ee92f3c803fe20a8a6e97714e1@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0b467b63
......@@ -5016,7 +5016,8 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
err = nl80211_parse_he_obss_pd(
info->attrs[NL80211_ATTR_HE_OBSS_PD],
&params.he_obss_pd);
goto out;
if (err)
goto out;
}
if (info->attrs[NL80211_ATTR_HE_BSS_COLOR]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment