[PATCH v1 21/31] net/ntnic: fix memory leak
Serhii Iliushyk
sil-plv at napatech.com
Tue Jan 21 18:07:59 CET 2025
From: Danylo Vodopianov <dvo-plv at napatech.com>
free for kvlist was added before return to avoid memory leak.
Coveriry issue: 446751
Fixes: fe91ade9f5db ("net/ntnic: add basic queue operations")
Signed-off-by: Danylo Vodopianov <dvo-plv at napatech.com>
---
drivers/net/ntnic/ntnic_ethdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 6fcbb8fa9b..d1360cc925 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -2089,6 +2089,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
NT_LOG_DBGX(ERR, NTNIC,
"problem with command line arguments: res=%d",
res);
+ free(kvlist);
return -1;
}
@@ -2112,6 +2113,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
NT_LOG_DBGX(ERR, NTNIC,
"problem with command line arguments: res=%d",
res);
+ free(kvlist);
return -1;
}
--
2.45.0
More information about the dev
mailing list