Skip to content

Commit

Permalink
net: add missing dev_put() in __netdev_adjacent_dev_insert
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nikolay Aleksandrov authored and David S. Miller committed Oct 25, 2013
1 parent 4a3ad7b commit 974daef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -4648,6 +4648,7 @@ static int __netdev_adjacent_dev_insert(struct net_device *dev,

free_adj:
kfree(adj);
dev_put(adj_dev);

return ret;
}
Expand Down

0 comments on commit 974daef

Please sign in to comment.