Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 252c3d84 authored by RongQing.Li's avatar RongQing.Li Committed by David S. Miller
Browse files

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: default avatarRongQing.Li <roy.qing.li@gmail.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 09946950
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);
		}