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
[ upstream commit 1f00a6a037040a7c6ba883e2c312894c6ebc4c32 ] 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") 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