[dpdk-stable] [dpdk-dev] [PATCH] efd: fix tailq entry leak in error path
wangyunjian
wangyunjian at huawei.com
Tue Sep 29 05:31:35 CEST 2020
From: Yunjian Wang <wangyunjian at huawei.com>
In rte_efd_create() allocated memory for tailq entry, we should
free it when error happens, otherwise it will lead to memory leak.
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable at dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
---
lib/librte_efd/rte_efd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c
index 6a799556d..0aa120f48 100644
--- a/lib/librte_efd/rte_efd.c
+++ b/lib/librte_efd/rte_efd.c
@@ -707,6 +707,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
error_unlock_exit:
rte_mcfg_tailq_write_unlock();
+ rte_free(te);
rte_efd_free(table);
return NULL;
--
2.23.0
More information about the stable
mailing list