mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
ipv6: release idev when ip6_neigh_lookup failed in icmp6_dst_alloc
release idev when ip6_neigh_lookup failed in icmp6_dst_alloc Signed-off-by: RongQing.Li <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
099469502f
commit
252c3d84ed
@ -1091,6 +1091,7 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev,
|
||||
else {
|
||||
neigh = ip6_neigh_lookup(&rt->dst, &fl6->daddr);
|
||||
if (IS_ERR(neigh)) {
|
||||
in6_dev_put(idev);
|
||||
dst_free(&rt->dst);
|
||||
return ERR_CAST(neigh);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user