Skip to content

Commit a9f0064

Browse files
pchelkin91Ping-Ke Shih
authored andcommitted
wifi: rtw89: fix leak in rtw89_core_send_nullfunc()
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]
1 parent c24248e commit a9f0064

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
@@ -3961,6 +3961,7 @@ int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rt
39613961
rtwsta_link = rtwsta->links[rtwvif_link->link_id];
39623962
if (unlikely(!rtwsta_link)) {
39633963
ret = -ENOLINK;
3964+
dev_kfree_skb_any(skb);
39643965
goto out;
39653966
}
39663967

0 commit comments

Comments
 (0)