net: add missing dev_put() in __netdev_adjacent_dev_insert
authorNikolay Aleksandrov <nikolay@redhat.com>
Wed, 23 Oct 2013 13:28:56 +0000 (15:28 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Oct 2013 23:03:39 +0000 (19:03 -0400)
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>
net/core/dev.c

index 0918aadc20fd2ce528ef284da6d6c87f5254f6a0..bdffd654edc446ab699d5ae370ba26496f5ff4e2 100644 (file)
@@ -4648,6 +4648,7 @@ remove_symlinks:
 
 free_adj:
        kfree(adj);
+       dev_put(adj_dev);
 
        return ret;
 }