Commit 3df91398 authored by Patrick McHardy's avatar Patrick McHardy Committed by David S. Miller

[IPV4]: Fix inet6_dev reference leak in ndisc_dst_alloc error path.

Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 25450a8d
......@@ -647,8 +647,10 @@ struct dst_entry *ndisc_dst_alloc(struct net_device *dev,
return NULL;
rt = ip6_dst_alloc();
if (unlikely(rt == NULL))
if (unlikely(rt == NULL)) {
in6_dev_put(idev);
goto out;
}
dev_hold(dev);
if (neigh)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment