From: Krzysztof Kanas Date: Thu, 19 Dec 2019 10:44:34 +0000 (+0100) Subject: mempool/octeontx: fix error handling in initialization X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4f2c3c7b1da78bbb6270668e7a2b412863439b7f;p=dpdk.git mempool/octeontx: fix error handling in initialization When octeontx_get_fpavf fails fpa pointer is used to get pool_stack_base, which is then freed. Coverity issue: 351263 Fixes: 9bc692f83baa ("mempool/octeontx: add application domain validation") Cc: stable@dpdk.org Signed-off-by: Krzysztof Kanas Acked-by: Jerin Jacob --- diff --git a/drivers/mempool/octeontx/octeontx_fpavf.c b/drivers/mempool/octeontx/octeontx_fpavf.c index c97267db3c..63f8fb3b50 100644 --- a/drivers/mempool/octeontx/octeontx_fpavf.c +++ b/drivers/mempool/octeontx/octeontx_fpavf.c @@ -305,10 +305,8 @@ octeontx_fpapf_pool_destroy(unsigned int gpool_index) int ret = -1; fpa = octeontx_get_fpavf(gpool_index); - if (fpa == NULL) { - ret = -EINVAL; - goto err; - } + if (fpa == NULL) + return -EINVAL; hdr.coproc = FPA_COPROC; hdr.msg = FPA_CONFIGSET;