Skip to content

Commit 547432e

Browse files
pchelkin91gregkh
authored andcommitted
wifi: rtw89: fix leak in rtw89_core_send_nullfunc()
[ Upstream commit a9f0064 ] If there is no rtwsta_link found in rtw89_core_send_nullfunc(), allocated skb is leaked. Free it on the error handling path. Found by Linux Verification Center (linuxtesting.org). Fixes: a8ba4ac ("wifi: rtw89: send nullfunc based on the given link") Signed-off-by: Fedor Pchelkin <[email protected]> Acked-by: Ping-Ke Shih <[email protected]> Signed-off-by: Ping-Ke Shih <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent 2c9876a commit 547432e

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/wireless/realtek/rtw89

1 file changed

+1
-0
lines changed

drivers/net/wireless/realtek/rtw89/core.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3456,6 +3456,7 @@ int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rt
34563456
rtwsta_link = rtwsta->links[rtwvif_link->link_id];
34573457
if (unlikely(!rtwsta_link)) {
34583458
ret = -ENOLINK;
3459+
dev_kfree_skb_any(skb);
34593460
goto out;
34603461
}
34613462

0 commit comments

Comments
 (0)