Search Linux Wireless

Re: [PATCH 2/2] nl80211: fix memory leak when parsing NL80211_ATTR_HE_BSS_COLOR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 26.06.20 11:49, Luca Coelho wrote:
From: Luca Coelho <luciano.coelho@xxxxxxxxx>

If there is an error when parsing the NL80211_ATTR_HE_BSS_COLOR
attribute, we return immediately without freeing param.acl.  Fit it by
using goto out instead of returning immediately.

Fixes: 5c5e52d1bb96 ("nl80211: add handling for BSS color")
Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>

Acked-by: John Crispin <john@xxxxxxxxxxx>

Thanks !

---
  net/wireless/nl80211.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f31698fd4a7e..0e07fb8585fb 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5025,7 +5025,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
  					info->attrs[NL80211_ATTR_HE_BSS_COLOR],
  					&params.he_bss_color);
  		if (err)
-			return err;
+			goto out;
  	}
nl80211_calculate_ap_params(&params);



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux