mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: mt76x02u: fix possible memory leak in __mt76x02u_mcu_send_msg
Free the skb if mt76u_bulk_msg fails in __mt76x02u_mcu_send_msg routine.
Fixes: 4c89ff2c74e39 ("mt76: split __mt76u_mcu_send_msg and mt76u_mcu_send_msg routines")
Co-developed-by: Gergo Koteles <[email protected]>
Signed-off-by: Gergo Koteles <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
e1b2c18eee
commit
0742eaeafe
+1
-1
@@ -108,7 +108,7 @@ __mt76x02u_mcu_send_msg(struct mt76_dev *dev, struct sk_buff *skb,
|
|||||||
ret = mt76u_bulk_msg(dev, skb->data, skb->len, NULL, 500,
|
ret = mt76u_bulk_msg(dev, skb->data, skb->len, NULL, 500,
|
||||||
MT_EP_OUT_INBAND_CMD);
|
MT_EP_OUT_INBAND_CMD);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
goto out;
|
||||||
|
|
||||||
if (wait_resp)
|
if (wait_resp)
|
||||||
ret = mt76x02u_mcu_wait_resp(dev, seq);
|
ret = mt76x02u_mcu_wait_resp(dev, seq);
|
||||||
|
|||||||
Reference in New Issue
Block a user