Fix one resource leak problem in the abnormal logic of secondary process. Fixes: 016141b18b3a ("net/nfp: refactor secondary process probe") Cc: sta...@dpdk.org
Signed-off-by: Chaoyong He <chaoyong...@corigine.com> Reviewed-by: Long Wu <long...@corigine.com> Reviewed-by: Peng Zhang <peng.zh...@corigine.com> --- drivers/net/nfp/nfp_ethdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c index b711e15b9f..98d8e87028 100644 --- a/drivers/net/nfp/nfp_ethdev.c +++ b/drivers/net/nfp/nfp_ethdev.c @@ -2123,7 +2123,7 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev) if (sym_tbl == NULL) { PMD_INIT_LOG(ERR, "Something is wrong with the firmware symbol table"); ret = -EIO; - goto sync_free; + goto cpp_cleanup; } /* Read the app ID of the firmware loaded */ @@ -2171,6 +2171,8 @@ nfp_pf_secondary_init(struct rte_pci_device *pci_dev) sym_tbl_cleanup: free(sym_tbl); +cpp_cleanup: + nfp_cpp_free(cpp); sync_free: nfp_sync_free(sync); pf_cleanup: -- 2.39.1