Skip to content

Commit 4320565

Browse files
committed
wifi: rtw89: fix leak in rtw89_core_send_nullfunc()
JIRA: https://issues.redhat.com/browse/RHEL-114889 commit a9f0064 Author: Fedor Pchelkin <pchelkin@ispras.ru> Date: Sat Sep 20 00:08:49 2025 +0300 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 <pchelkin@ispras.ru> Acked-by: Ping-Ke Shih <pkshih@realtek.com> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com> Link: https://patch.msgid.link/20250919210852.823912-4-pchelkin@ispras.ru Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent 09f863b commit 4320565

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
@@ -3441,6 +3441,7 @@ int rtw89_core_send_nullfunc(struct rtw89_dev *rtwdev, struct rtw89_vif_link *rt
34413441
rtwsta_link = rtwsta->links[rtwvif_link->link_id];
34423442
if (unlikely(!rtwsta_link)) {
34433443
ret = -ENOLINK;
3444+
dev_kfree_skb_any(skb);
34443445
goto out;
34453446
}
34463447

0 commit comments

Comments
 (0)