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: Nikolay Aleksandrov <nikolay@redhat.com>
Acked-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/core/dev.c b/net/core/dev.c
index 0918aad..bdffd65 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4648,6 +4648,7 @@
free_adj:
kfree(adj);
+ dev_put(adj_dev);
return ret;
}