]> git.dujemihanovic.xyz Git - linux.git/commitdiff
net: usb: qmi_wwan: fix memory leak for not ip packets
authorDaniele Palmas <dnlplm@gmail.com>
Thu, 1 Aug 2024 13:55:12 +0000 (15:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Aug 2024 10:11:31 +0000 (11:11 +0100)
Free the unused skb when not ip packets arrive.

Fixes: c6adf77953bc ("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>
drivers/net/usb/qmi_wwan.c

index 386d62769dedb1411150597b5ddc4d951e91b666..cfda32047cffbdfa475b37c5688f3974fbc2b03d 100644 (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;
                }