efd: fix tailq entry leak in error path
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 29 Sep 2020 03:31:35 +0000 (11:31 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 22 Oct 2020 20:07:15 +0000 (22:07 +0200)
commitc2402fcaf937b17da2b886443c3733b4234eea68
tree627d5936e5b7ab7b4e319def9d24ebcc5ab3a0ac
parent5a1c7b6ddd2c1c1eac2dab0a6458f598c15f693e
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 <wangyunjian@huawei.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
lib/librte_efd/rte_efd.c