From: Hemant Agrawal Date: Wed, 6 Nov 2019 05:17:20 +0000 (+0530) Subject: crypto/dpaa2_sec: add check for session validity X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=447a5d4029b363481ee7c930a4b8c68f1a36cec6;p=dpdk.git crypto/dpaa2_sec: add check for session validity Check if the session is not null during processing. Signed-off-by: Hemant Agrawal Acked-by: Akhil Goyal --- diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index b04890a489..7d51112c5e 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -1365,6 +1365,9 @@ build_sec_fd(struct rte_crypto_op *op, else return -1; + if (!sess) + return -1; + /* Any of the buffer is segmented*/ if (!rte_pktmbuf_is_contiguous(op->sym->m_src) || ((op->sym->m_dst != NULL) &&