From: Yunjian Wang Date: Tue, 29 Sep 2020 03:31:35 +0000 (+0800) Subject: efd: fix tailq entry leak in error path X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c2402fcaf937b17da2b886443c3733b4234eea68;p=dpdk.git efd: fix tailq entry leak in error path 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@dpdk.org Signed-off-by: Yunjian Wang Acked-by: Yipeng Wang --- diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c index ec3a4cd58e..77f46809f8 100644 --- a/lib/librte_efd/rte_efd.c +++ b/lib/librte_efd/rte_efd.c @@ -711,6 +711,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;