Skip to content

Commit cffd934

Browse files
LorenzoBianconinbd168
authored andcommitted
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: 4c89ff2 ("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]>
1 parent 6390729 commit cffd934

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wireless/mediatek/mt76/mt76x02_usb_mcu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ __mt76x02u_mcu_send_msg(struct mt76_dev *dev, struct sk_buff *skb,
108108
ret = mt76u_bulk_msg(dev, skb->data, skb->len, NULL, 500,
109109
MT_EP_OUT_INBAND_CMD);
110110
if (ret)
111-
return ret;
111+
goto out;
112112

113113
if (wait_resp)
114114
ret = mt76x02u_mcu_wait_resp(dev, seq);

0 commit comments

Comments
 (0)