From: greearb@candelatech.com
To: netdev@vger.kernel.org
Cc: Ben Greear <greearb@candelatech.com>
Subject: [PATCH] ipv6-multicast: Fix memory leak in input path.
Date: Tue, 27 Sep 2011 11:58:17 -0700 [thread overview]
Message-ID: <1317149897-14932-1-git-send-email-greearb@candelatech.com> (raw)
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
next reply other threads:[~2011-09-27 19:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 18:58 greearb [this message]
2011-09-27 19:16 ` [PATCH] ipv6-multicast: Fix memory leak in input path 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317149897-14932-1-git-send-email-greearb@candelatech.com \
--to=greearb@candelatech.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox