[PATCH 3/7] net/nfp: fix resource leak for PF initialization
Chaoyong He
chaoyong.he at corigine.com
Thu Nov 30 09:52:34 CET 2023
Fix the resource leak problem in the abnormal logic of PF initialize
function.
Fixes: 646ea79ce481 ("net/nfp: move PF functions into its own file")
Fixes: 8ba461d1eecc ("net/nfp: introduce keepalive mechanism for multiple PF")
Cc: peng.zhang at corigine.com
Cc: stable at dpdk.org
Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
Reviewed-by: Long Wu <long.wu at corigine.com>
Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
---
drivers/net/nfp/nfp_ethdev.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nfp/nfp_ethdev.c b/drivers/net/nfp/nfp_ethdev.c
index 38ee1c399a..bb0ddf3d54 100644
--- a/drivers/net/nfp/nfp_ethdev.c
+++ b/drivers/net/nfp/nfp_ethdev.c
@@ -1326,12 +1326,13 @@ nfp_pf_init(struct rte_pci_device *pci_dev)
return 0;
hwqueues_cleanup:
- nfp_cpp_area_free(pf_dev->qc_area);
+ nfp_cpp_area_release_free(pf_dev->qc_area);
sym_tbl_cleanup:
free(sym_tbl);
fw_cleanup:
nfp_fw_unload(cpp);
nfp_net_keepalive_stop(&pf_dev->multi_pf);
+ nfp_net_keepalive_uninit(&pf_dev->multi_pf);
eth_table_cleanup:
free(nfp_eth_table);
hwinfo_cleanup:
--
2.39.1
More information about the stable
mailing list