The qp was being used in the cleanup without checking if it was non NULL.
A check is now added to verify qp is non NULL before use.
Coverity issue: 374375
Fixes: c75542ae4200 ("crypto/ipsec_mb: introduce IPsec_mb framework")
Cc: stable@dpdk.org
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
return 0;
qp_setup_cleanup:
+ if (qp == NULL)
+ return ret;
#if IMB_VERSION(1, 1, 0) > IMB_VERSION_NUM
if (qp->mb_mgr)
free_mb_mgr(qp->mb_mgr);
if (qp->mb_mgr_mz)
rte_memzone_free(qp->mb_mgr_mz);
#endif
- if (qp)
- rte_free(qp);
+ rte_free(qp);
return ret;
}