mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 16:44:58 +02:00
wifi: mt76: mt7996: fix memory leak on mt7996_mcu_sta_key_tlv error
Free the allocated skb on error Link: https://patch.msgid.link/20250915075910.47558-5-nbd@nbd.name Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
0c45d52276
commit
7c0f63fe37
|
|
@ -2614,8 +2614,10 @@ int mt7996_mcu_add_key(struct mt76_dev *dev, struct ieee80211_vif *vif,
|
|||
return PTR_ERR(skb);
|
||||
|
||||
ret = mt7996_mcu_sta_key_tlv(wcid, skb, key, cmd);
|
||||
if (ret)
|
||||
if (ret) {
|
||||
dev_kfree_skb(skb);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return mt76_mcu_skb_send_msg(dev, skb, mcu_cmd, true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user