bus/pci: fix leak for unbound devices
authorDavid Marchand <david.marchand@redhat.com>
Wed, 16 Jun 2021 06:52:57 +0000 (08:52 +0200)
committerDavid Marchand <david.marchand@redhat.com>
Tue, 6 Jul 2021 09:27:55 +0000 (11:27 +0200)
commit7c83a1e3c83e601f449f05e2e36e1df50e8503aa
treebb5feb3e18047c85253052c82434c7bf2af8d175
parentaa777f003abf0b2c2dd8589605928e1541681e6f
bus/pci: fix leak for unbound devices

For devices not bound to any Linux kernel module, we leak a pci object
since it is never added to the PCI bus device list.

Fixes: c79a1c67465d ("bus/pci: optimize bus scan")
Cc: stable@dpdk.org
Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
drivers/bus/pci/linux/pci.c