ipv6: fix icmp6_dst_alloc()

commit 87a115783 ( ipv6: Move xfrm_lookup() call down into
icmp6_dst_alloc().) forgot to convert one error path, leading
to crashes in mld_sendpack()

Many thanks to Dave Jones for providing a very complete bug report.

Reported-by: Dave Jones <davej@redhat.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Eric Dumazet and committed by David S. Miller 122bdf67 762ad8a5

+1 -1
+1 -1
net/ipv6/route.c
··· 1077 struct net *net = dev_net(dev); 1078 1079 if (unlikely(!idev)) 1080 - return NULL; 1081 1082 rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); 1083 if (unlikely(!rt)) {
··· 1077 struct net *net = dev_net(dev); 1078 1079 if (unlikely(!idev)) 1080 + return ERR_PTR(-ENODEV); 1081 1082 rt = ip6_dst_alloc(&net->ipv6.ip6_dst_ops, dev, 0); 1083 if (unlikely(!rt)) {