mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 08:15:07 -04:00
wifi: rtw88: Fix potential memory leak in rtw_txq_push_skb()
The skb passed to the rtw_hci_tx_write() is expected to be freed when
the function fails, but the error path in rtw_txq_push_skb() does not
free the skb before returning. This can lead to a memory leak in
rtw_txq_push() where a dequeued skb is passed to rtw_txq_push_skb().
Fixes: aaab5d0e67 ("rtw88: kick off TX packets once for higher efficiency")
Cc: stable@vger.kernel.org
Signed-off-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Acked-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Link: https://patch.msgid.link/20260727064223.61836-1-nihaal@cse.iitm.ac.in
This commit is contained in:
committed by
Ping-Ke Shih
parent
bbc18041ad
commit
9f29480107
@@ -619,6 +619,7 @@ static int rtw_txq_push_skb(struct rtw_dev *rtwdev,
|
||||
ret = rtw_hci_tx_write(rtwdev, &pkt_info, skb);
|
||||
if (ret) {
|
||||
rtw_err(rtwdev, "failed to write TX skb to HCI\n");
|
||||
ieee80211_free_txskb(rtwdev->hw, skb);
|
||||
return ret;
|
||||
}
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user