net: usb: qmi_wwan: fix memory leak for not ip packets

Free the unused skb when not ip packets arrive.

Fixes: c6adf77953 ("net: usb: qmi_wwan: add qmap mux protocol support")
Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Acked-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Daniele Palmas 2024-08-01 15:55:12 +02:00 committed by David S. Miller
parent 268762d0bb
commit 7ab107544b

View File

@ -201,6 +201,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
break;
default:
/* not ip - do not know what to do */
kfree_skb(skbn);
goto skip;
}