diff options
| author | Ben Greear <greearb@candelatech.com> | 2011-09-27 15:16:08 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-29 19:33:48 -0500 |
| commit | 23b139ecf944b097a0493262cbc04886363bd8e6 (patch) | |
| tree | 7fb53fa36a9aed58423ab8df27798d81d1103a3b /net/ipv6 | |
| parent | d6be19f41ab91acca04abdca61353245d57d9ffc (diff) | |
ipv6-multicast: Fix memory leak in input path.
[ Upstream commit 2015de5fe2a47086a3260802275932bfd810884e ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | 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 82a809901f8..450a1ffdfe0 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
| @@ -2051,8 +2051,10 @@ int ip6_mr_input(struct sk_buff *skb) | |||
| 2051 | int err; | 2051 | int err; |
| 2052 | 2052 | ||
| 2053 | err = ip6mr_fib_lookup(net, &fl6, &mrt); | 2053 | err = ip6mr_fib_lookup(net, &fl6, &mrt); |
| 2054 | if (err < 0) | 2054 | if (err < 0) { |
| 2055 | kfree_skb(skb); | ||
| 2055 | return err; | 2056 | return err; |
| 2057 | } | ||
| 2056 | 2058 | ||
| 2057 | read_lock(&mrt_lock); | 2059 | read_lock(&mrt_lock); |
| 2058 | cache = ip6mr_cache_find(mrt, | 2060 | cache = ip6mr_cache_find(mrt, |
