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:
RongQing.Li 2012-01-12 22:33:46 +00:00 committed by David S. Miller
parent 099469502f
commit 252c3d84ed
1 changed files with 1 additions and 0 deletions

View File

@ -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);
}