Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ethdev: fix potential leak in PCI probing helper
Sanity check is performed after a rte_eth_dev object is allocated. The object is not freed if the check fails, though in the current reality this never happens, but it's better programming paradigm to move the quick check up front to the start of rte_eth_dev_pci_generic_probe(). Fixes: dcd5c81 ("ethdev: add PCI driver helpers") Cc: stable@dpdk.org Signed-off-by: Kaiyu Zhang <squirrel.prog@gmail.com> Reviewed-by: Chengwen Feng <fengchengwen@huawei.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>
- Loading branch information