public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ipv6-multicast:  Fix memory leak in input path.
@ 2011-09-27 18:58 greearb
  2011-09-27 19:16 ` David Miller
  0 siblings, 1 reply; 6+ messages in thread
From: greearb @ 2011-09-27 18:58 UTC (permalink / raw)
  To: netdev; +Cc: Ben Greear

From: Ben Greear <greearb@candelatech.com>

Have to free the skb before returning if we fail
the fib lookup.

Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 e9a8df9... 86e3cc1... M	net/ipv6/ip6mr.c
 net/ipv6/ip6mr.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index e9a8df9..86e3cc1 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -2053,8 +2053,10 @@ int ip6_mr_input(struct sk_buff *skb)
 	int err;
 
 	err = ip6mr_fib_lookup(net, &fl6, &mrt);
-	if (err < 0)
+	if (err < 0) {
+		kfree_skb(skb);
 		return err;
+	}
 
 	read_lock(&mrt_lock);
 	cache = ip6mr_cache_find(mrt,
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-04 21:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-27 18:58 [PATCH] ipv6-multicast: Fix memory leak in input path greearb
2011-09-27 19:16 ` David Miller
2011-09-27 19:34   ` Ben Greear
2011-09-27 20:08     ` Eric Dumazet
2012-02-02 17:26   ` Ben Greear
2012-02-04 21:49     ` David Miller

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