提交 974daef7 编写于 作者: N Nikolay Aleksandrov 提交者: David S. Miller

net: add missing dev_put() in __netdev_adjacent_dev_insert

I think that a dev_put() is needed in the error path to preserve the
proper dev refcount.

CC: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: NNikolay Aleksandrov <nikolay@redhat.com>
Acked-by: NVeaceslav Falico <vfalico@redhat.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4a3ad7b3
......@@ -4648,6 +4648,7 @@ static int __netdev_adjacent_dev_insert(struct net_device *dev,
free_adj:
kfree(adj);
dev_put(adj_dev);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册