eventdev: fix adapter leak in error path
authorYunjian Wang <wangyunjian@huawei.com>
Tue, 29 Sep 2020 13:46:33 +0000 (21:46 +0800)
committerJerin Jacob <jerinj@marvell.com>
Thu, 15 Oct 2020 19:38:09 +0000 (21:38 +0200)
commitb7b09dab5e9507541222d1d2ce86f55e9eb32b9e
treed2ace6ae7e8393843a75ff40fd6b1981b19b0d90
parentdb5e0e7aea5e256c43489a3b272a4318b6ddca9f
eventdev: fix adapter leak in error path

In rte_event_crypto_adapter_create_ext() allocated memory for
adapter, we should free it when error happens, otherwise it
will lead to memory leak.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
lib/librte_eventdev/rte_event_crypto_adapter.c