mirror of
https://github.com/torvalds/linux.git
synced 2024-12-29 06:12:08 +00:00
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>
This commit is contained in:
parent
29453f65a4
commit
2015de5fe2
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user