mirror of
https://github.com/torvalds/linux.git
synced 2026-06-09 07:03:37 +02:00
net-sysfs: fix netdev_queue_add_kobject() breakage
commit48a322b6f9upstream. kobject_put() should only be called in error path. Fixes:b8eb718348("net-sysfs: Fix reference count leak in rx|netdev_queue_add_kobject") Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Jouni Hogander <jouni.hogander@unikie.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
60e7154661
commit
7070695e60
|
|
@ -1484,6 +1484,7 @@ static int netdev_queue_add_kobject(struct net_device *dev, int index)
|
|||
#endif
|
||||
|
||||
kobject_uevent(kobj, KOBJ_ADD);
|
||||
return 0;
|
||||
|
||||
err:
|
||||
kobject_put(kobj);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user