summaryrefslogtreecommitdiff
path: root/net/ipv6/ip6mr.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2011-09-27 19:16:08 (GMT)
committerDavid S. Miller <davem@davemloft.net>2011-09-27 19:16:08 (GMT)
commit2015de5fe2a47086a3260802275932bfd810884e (patch)
tree2155f30fa4c0a664935264bad216c872f929063b /net/ipv6/ip6mr.c
parent29453f65a4d0a46190dedf93ab31717d4c26bda6 (diff)
downloadlinux-2015de5fe2a47086a3260802275932bfd810884e.tar.xz
ipv6-multicast: Fix memory leak in input path.
Have to free the skb before returning if we fail the fib lookup. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6mr.c')
-rw-r--r--net/ipv6/ip6mr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 705c828..825d02f 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -2052,8 +2052,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,