diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/route.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d98cf41edf2a..4bf362baa97a 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1089,8 +1089,10 @@ struct dst_entry *icmp6_dst_alloc(struct net_device *dev, | |||
1089 | neigh_hold(neigh); | 1089 | neigh_hold(neigh); |
1090 | else { | 1090 | else { |
1091 | neigh = __neigh_lookup_errno(&nd_tbl, &fl6->daddr, dev); | 1091 | neigh = __neigh_lookup_errno(&nd_tbl, &fl6->daddr, dev); |
1092 | if (IS_ERR(neigh)) | 1092 | if (IS_ERR(neigh)) { |
1093 | neigh = NULL; | 1093 | dst_free(&rt->dst); |
1094 | return ERR_CAST(neigh); | ||
1095 | } | ||
1094 | } | 1096 | } |
1095 | 1097 | ||
1096 | rt->dst.flags |= DST_HOST; | 1098 | rt->dst.flags |= DST_HOST; |