Skip to contentSkip to conversation

crypto/ipsec_mb: fix qp cleanup unreachable code

PATCH Applied Ciara Power 2 participants 2 messages Feb 15, 2022 – Feb 17, 2022 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto/ipsec_mb: fix qp cleanup unreachable code

The qp is never NULL when it reaches the qp_setup_cleanup error handling code. This is due to checks earlier in the function that return an error if qp is NULL.

Coverity issue: 375013

Fixes 581c39b1cb7d ("crypto/ipsec_mb: fix queue cleanup null pointer dereference")
---
 drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 2 --
 1 file changed, 2 deletions(-)
drivers/crypto/ipsec_mb/ipsec_mb_ops.c +0 -2
index 1cf37e9836..7e8396b4a3 100644
@@ -284,8 +284,6 @@ ipsec_mb_qp_setup(struct rte_cryptodev *dev, uint16_t qp_id,
 	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);
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 10 lines

The qp is never NULL when it reaches the qp_setup_cleanup error handling code. This is due to checks earlier in the function that return an error if qp is NULL.

Coverity issue: 375013

Fixes 581c39b1cb7d ("crypto/ipsec_mb: fix queue cleanup null pointer

dereference")
Cc: [email protected]

Applied to dpdk-next-crypto