mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt7615: fix memory leak in mt7615_coredump_work
Similar to the issue fixed in mt7921_coredump_work, fix a possible memory
leak in mt7615_coredump_work routine.
Fixes: d2bf7959d9c0f ("mt76: mt7663: introduce coredump support")
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
8e3f5bfe74
commit
8e3bba8bd3
+4
-2
@@ -2352,8 +2352,10 @@ void mt7615_coredump_work(struct work_struct *work)
|
||||
break;
|
||||
|
||||
skb_pull(skb, sizeof(struct mt7615_mcu_rxd));
|
||||
if (data + skb->len - dump > MT76_CONNAC_COREDUMP_SZ)
|
||||
break;
|
||||
if (data + skb->len - dump > MT76_CONNAC_COREDUMP_SZ) {
|
||||
dev_kfree_skb(skb);
|
||||
continue;
|
||||
}
|
||||
|
||||
memcpy(data, skb->data, skb->len);
|
||||
data += skb->len;
|
||||
|
||||
Reference in New Issue
Block a user