Files
linux/drivers/pci
Qiushi Wu 572b1f29ea PCI: Fix pci_create_slot() reference count leak
[ Upstream commit 8a94644b44 ]

kobject_init_and_add() takes a reference even when it fails.  If it returns
an error, kobject_put() must be called to clean up the memory associated
with the object.

When kobject_init_and_add() fails, call kobject_put() instead of kfree().

b8eb718348 ("net-sysfs: Fix reference count leak in
rx|netdev_queue_add_kobject") fixed a similar problem.

Link: https://lore.kernel.org/r/20200528021322.1984-1-wu000273@umn.edu
Signed-off-by: Qiushi Wu <wu000273@umn.edu>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-16 08:56:52 +09:00
..
2015-08-13 15:59:59 -05:00
2023-05-15 12:46:28 +09:00
2014-06-10 20:20:19 -06:00
2023-05-15 14:51:06 +09:00
2023-05-15 17:34:20 +09:00
2017-03-22 12:43:36 +01:00
2014-06-10 20:20:19 -06:00
2016-06-20 13:24:20 -05:00