summaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
authorRongQing.Li <roy.qing.li@gmail.com>2012-01-12 23:33:46 +0100
committerDavid S. Miller <davem@davemloft.net>2012-01-13 19:10:46 +0100
commit252c3d84ed398b090ac2dace46fc6faa6cfaea99 (patch)
treeafbeb033aa2857971aff3919c39f3c0b04c340f3 /net/ipv6
parentMerge branch 'akpm' (aka "Andrew's patch-bomb, take two") (diff)
downloadlinux-252c3d84ed398b090ac2dace46fc6faa6cfaea99.tar.xz
linux-252c3d84ed398b090ac2dace46fc6faa6cfaea99.zip
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>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/route.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 07361dfa8085..8c2e3ab58f2a 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -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);
}