diff mbox series

mt76: mt7915: fix memory leak in mt7915_mcu_get_rx_rate()

Message ID 20201116114554.15899-1-shayne.chen@mediatek.com (mailing list archive)
State New
Headers show
Series mt76: mt7915: fix memory leak in mt7915_mcu_get_rx_rate() | expand

Commit Message

Shayne Chen Nov. 16, 2020, 11:45 a.m. UTC
Free the skb to prevent memory leak.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
index 3e1f7ee..4776532 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
@@ -3515,5 +3515,7 @@  int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
 		break;
 	}
 
+	dev_kfree_skb(skb);
+
 	return 0;
 }