Commit f9e23420 authored by Wei Yang's avatar Wei Yang Committed by Jakub Kicinski
Browse files

net: atm: fix skb leak in sigd_send() default branch



The default branch in sigd_send() calls sock_put() and returns -EINVAL
without freeing the skb, while all other exit paths do so. Add the
missing dev_kfree_skb() before sock_put() to fix the leak.

Fixes: 1da177e4 ("Linux-2.6.12-rc2")
Signed-off-by: default avatarWei Yang <albinwyang@tencent.com>
Link: https://patch.msgid.link/20260509122358.1102997-1-albin_yang@163.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e3adf69f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -179,6 +179,7 @@ static int sigd_send(struct atm_vcc *vcc, struct sk_buff *skb)
		break;
	default:
		pr_alert("bad message type %d\n", (int)msg->type);
		dev_kfree_skb(skb);
		/* Paired with find_get_vcc(msg->vcc) above */
		sock_put(sk);
		return -EINVAL;