wifi: rtw89: fix potential leak in rtw89_append_probe_req_ie()
authorZong-Zhe Yang <kevin_yang@realtek.com>
Tue, 3 Jan 2023 14:10:54 +0000 (22:10 +0800)
committerKalle Valo <kvalo@kernel.org>
Mon, 16 Jan 2023 13:35:21 +0000 (15:35 +0200)
commit4a0e218cc9c42d1903ade8b5a371dcf48cf918c5
tree4cda1b4f183e61f4e45785010e93329a92da519f
parent3f625adc61a0f015c2ce982bc49a84e163094a0c
wifi: rtw89: fix potential leak in rtw89_append_probe_req_ie()

Do `kfree_skb(new)` before `goto out` to prevent potential leak.

Fixes: 895907779752 ("rtw89: 8852a: add ieee80211_ops::hw_scan")
Signed-off-by: Zong-Zhe Yang <kevin_yang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230103141054.17372-1-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/fw.c