fixing memory leak while creating the PDCP session with invalid data. Fixes: bef594ec5cc8 ("crypto/dpaa2_sec: support PDCP offload") Cc: akhil.go...@nxp.com Cc: sta...@dpdk.org
Signed-off-by: Gagandeep Singh <g.si...@nxp.com> --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index c1f7181d55..e0b8bacdb8 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -3420,6 +3420,7 @@ dpaa2_sec_set_pdcp_session(struct rte_cryptodev *dev, } } else { DPAA2_SEC_ERR("Invalid crypto type"); + rte_free(priv); return -EINVAL; } -- 2.25.1