Files
twx-linux/drivers
Qiushi Wu d3d12858d4 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>
2020-09-03 11:22:26 +02:00
..
…
…
…
…
…
…
2020-08-21 09:48:03 +02:00
…
…
…
…
…
…
…
…
…
2020-08-21 09:48:08 +02:00
…
2020-09-03 11:22:24 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…