netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert
@ 2013-10-23 13:28 Nikolay Aleksandrov
  2013-10-23 13:36 ` Veaceslav Falico
  2013-10-25 23:04 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Nikolay Aleksandrov @ 2013-10-23 13:28 UTC (permalink / raw)
  To: netdev; +Cc: davem, Nikolay Aleksandrov, Veaceslav Falico

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>
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)

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 @@ remove_symlinks:
 
 free_adj:
 	kfree(adj);
+	dev_put(adj_dev);
 
 	return ret;
 }
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-25 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 13:28 [PATCH net-next] net: add missing dev_put() in __netdev_adjacent_dev_insert Nikolay Aleksandrov
2013-10-23 13:36 ` Veaceslav Falico
2013-10-25 23:04 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).