wifi: mt76: mt7603: free beacon SKB on error
Subsystems (2)
PATCH 1/1 wifi: mt76: mt7603: free beacon SKB on error
The SKB containing the generated beacon is not freed when the beacon queue is deected stuck and scheduled for recovery.
Fixes potential memory leaks in case the beacon queue is detected stuck.
Signed-off-by David Bauer <[email protected]>
--- drivers/net/wireless/mediatek/mt76/mt7603/beacon.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/wireless/mediatek/mt76/mt7603/beacon.c +2 -0
@@ -56,6 +56,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) FIELD_PREP(MT_DMA_FQCR0_TARGET_QID, MT_TX_HW_QUEUE_BCN));if (!mt76_poll (dev,MT_DMA_FQCR0 ,MT_DMA_FQCR0_BUSY ,0 ,5000 )) { dev->beacon_check =MT7603_WATCHDOG_TIMEOUT ; +dev_kfree_skb (skb); goto out; }
@@ -63,6 +64,7 @@ mt7603_update_beacon_iter(void *priv, u8 *mac, struct ieee80211_vif *vif) FIELD_PREP(MT_DMA_FQCR0_TARGET_QID, MT_TX_HW_QUEUE_BMC));if (!mt76_poll (dev,MT_DMA_FQCR0 ,MT_DMA_FQCR0_BUSY ,0 ,5000 )) { dev->beacon_check =MT7603_WATCHDOG_TIMEOUT ; +dev_kfree_skb (skb); goto out; }
Signature · 1 line
2.53.0