Netdev List
 help / color / mirror / Atom feed
* [PATCH] net: atm: fix skb leak in sigd_send() default branch
@ 2026-05-09 12:23 albin_yang
  0 siblings, 0 replies; only message in thread
From: albin_yang @ 2026-05-09 12:23 UTC (permalink / raw)
  To: 3chas3, davem, kuba, pabeni, horms
  Cc: linux-atm-general, netdev, linux-kernel, albinwyang

From: Wei Yang <albinwyang@tencent.com>

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: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Wei Yang <albinwyang@tencent.com>
---
 net/atm/signaling.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/atm/signaling.c b/net/atm/signaling.c
index ae88a5d2f29b..0000000000000 100644
--- a/net/atm/signaling.c
+++ b/net/atm/signaling.c
@@ -179,6 +179,7 @@ static int sigd_send(struct atm_vcc *vcc, struct sk_buff *skb)
 	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;
 	}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-09 12:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-09 12:23 [PATCH] net: atm: fix skb leak in sigd_send() default branch albin_yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox