Skip to content

Commit

Permalink
net: usb: qmi_wwan: fix memory leak for not ip packets
Browse files Browse the repository at this point in the history
Free the unused skb when not ip packets arrive.

Fixes: c6adf77 ("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>
  • Loading branch information
dnlplm authored and davem330 committed Aug 5, 2024
1 parent 268762d commit 7ab1075
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/usb/qmi_wwan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7ab1075

Please sign in to comment.