Skip to content

Commit

Permalink
crypto/ipsec_mb: fix premature dereference
Browse files Browse the repository at this point in the history
[ upstream commit 8c60a04 ]

This patch removes coverity defect CID 374380:
Null pointer dereferences  (REVERSE_INULL)

Coverity issue: CID 374380
Fixes: 918fd2f ("crypto/ipsec_mb: move aesni_mb PMD")

Signed-off-by: Piotr Bronowski <piotrx.bronowski@intel.com>
  • Loading branch information
pbronowx authored and kevintraynor committed Feb 21, 2022
1 parent 98ece68 commit 13aab9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/crypto/ipsec_mb/ipsec_mb_private.h
Expand Up @@ -191,13 +191,13 @@ ipsec_mb_parse_xform(const struct rte_crypto_sym_xform *xform,
const struct rte_crypto_sym_xform **cipher_xform,
const struct rte_crypto_sym_xform **aead_xform)
{
const struct rte_crypto_sym_xform *next = xform->next;

if (xform == NULL) {
*mode = IPSEC_MB_OP_NOT_SUPPORTED;
return -ENOTSUP;
}

const struct rte_crypto_sym_xform *next = xform->next;

if (xform->type == RTE_CRYPTO_SYM_XFORM_CIPHER) {
if (next == NULL) {
if (xform->cipher.op == RTE_CRYPTO_CIPHER_OP_ENCRYPT) {
Expand Down

0 comments on commit 13aab9f

Please sign in to comment.