Commit cd461602 authored by Daniele Palmas's avatar Daniele Palmas Committed by Pu Lehui
Browse files

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

stable inclusion
from stable-v5.10.224
commit e87f52225e04a7001bf55bbd7a330fa4252327b5
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IALDR9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e87f52225e04



--------------------------------

[ Upstream commit 7ab107544b777c3bd7feb9fe447367d8edd5b202 ]

Free the unused skb when not ip packets arrive.

Fixes: c6adf779 ("net: usb: qmi_wwan: add qmap mux protocol support")
Signed-off-by: default avatarDaniele Palmas <dnlplm@gmail.com>
Acked-by: default avatarBjørn Mork <bjorn@mork.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarPu Lehui <pulehui@huawei.com>
parent 5184a907
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,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;
		}