[PATCH v1 1/1] net/nbl: fix Leonis resource ops cleanup
Dimon Zhao
dimon.zhao at nebula-matrix.com
Wed Dec 2 04:08:50 CET 2026
The Leonis resource ops table is allocated with calloc(). If Tx/Rx ops
setup fails, the error path releases the table with rte_free().
Free the table with free() and clear the pointer on setup failure.
Fixes: c2d6a1b7a491 ("net/nbl: add resource layer")
Cc: stable at dpdk.org
Signed-off-by: Dimon Zhao <dimon.zhao at nebula-matrix.com>
---
drivers/net/nbl/nbl_hw/nbl_hw_leonis/nbl_res_leonis.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/nbl/nbl_hw/nbl_hw_leonis/nbl_res_leonis.c b/drivers/net/nbl/nbl_hw/nbl_hw_leonis/nbl_res_leonis.c
index 5d40d4f..6f06943 100644
--- a/drivers/net/nbl/nbl_hw/nbl_hw_leonis/nbl_res_leonis.c
+++ b/drivers/net/nbl/nbl_hw/nbl_hw_leonis/nbl_res_leonis.c
@@ -151,7 +151,8 @@ static int nbl_res_setup_ops(struct nbl_resource_ops_tbl **res_ops_tbl,
return ret;
set_ops_failed:
- rte_free(*res_ops_tbl);
+ free(*res_ops_tbl);
+ *res_ops_tbl = NULL;
return ret;
}
--
2.53.0
More information about the stable
mailing list