git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa777f0
)
bus/pci: fix leak for unbound devices
author
David Marchand
<david.marchand@redhat.com>
Wed, 16 Jun 2021 06:52:57 +0000
(08:52 +0200)
committer
David Marchand
<david.marchand@redhat.com>
Tue, 6 Jul 2021 09:27:55 +0000
(11:27 +0200)
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
patch
|
blob
|
history
diff --git
a/drivers/bus/pci/linux/pci.c
b/drivers/bus/pci/linux/pci.c
index
80ffe76
..
4d261b5
100644
(file)
--- a/
drivers/bus/pci/linux/pci.c
+++ b/
drivers/bus/pci/linux/pci.c
@@
-327,7
+327,7
@@
pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
else
dev->kdrv = RTE_PCI_KDRV_UNKNOWN;
} else {
-
dev->kdrv = RTE_PCI_KDRV_NONE
;
+
free(dev)
;
return 0;
}
/* device is valid, add in list (sorted) */