mt76: mt7915: fix memory leak in mt7915_mcu_get_rx_rate()
authorShayne Chen <shayne.chen@mediatek.com>
Mon, 16 Nov 2020 11:45:54 +0000 (19:45 +0800)
committerFelix Fietkau <nbd@nbd.name>
Fri, 4 Dec 2020 13:31:16 +0000 (14:31 +0100)
Free the skb to prevent memory leak.

Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c

index 1b2f762..6097653 100644 (file)
@@ -3541,5 +3541,7 @@ int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif,
                break;
        }
 
+       dev_kfree_skb(skb);
+
        return 0;
 }