wifi: rtw89: free unused skb to prevent memory leak

This avoid potential memory leak under power saving mode.

Signed-off-by: Po-Hao Huang <phhuang@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/20220916033811.13862-6-pkshih@realtek.com
This commit is contained in:
Po-Hao Huang 2022-09-16 11:38:09 +08:00 committed by Kalle Valo
parent a63ae6736d
commit eae672f386
1 changed files with 1 additions and 0 deletions

View File

@ -847,6 +847,7 @@ int rtw89_h2c_tx(struct rtw89_dev *rtwdev,
rtw89_debug(rtwdev, RTW89_DBG_FW,
"ignore h2c due to power is off with firmware state=%d\n",
test_bit(RTW89_FLAG_FW_RDY, rtwdev->flags));
dev_kfree_skb(skb);
return 0;
}