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: 56b6ef874f
("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
This commit is contained in:
parent
5a1c7b6ddd
commit
c2402fcaf9
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user