aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug
diff options
context:
space:
mode:
authorQiushi Wu <wu000273@umn.edu>2020-05-27 21:13:22 -0500
committerBjorn Helgaas <bhelgaas@google.com>2020-07-10 15:48:22 -0500
commit8a94644b440eef5a7b9c104ac8aa7a7f413e35e5 (patch)
treeb02762f2e59fa78becb79ffa0173ffef8c0b4931 /drivers/pci/hotplug
parentLinux 5.8-rc1 (diff)
downloadlinux-dev-8a94644b440eef5a7b9c104ac8aa7a7f413e35e5.tar.xz
linux-dev-8a94644b440eef5a7b9c104ac8aa7a7f413e35e5.zip
PCI: Fix pci_create_slot() reference count leak
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(). b8eb718348b8 ("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>
Diffstat (limited to 'drivers/pci/hotplug')
0 files changed, 0 insertions, 0 deletions