From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 06F88A034C for ; Tue, 15 Feb 2022 12:08:07 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EEB994114B; Tue, 15 Feb 2022 12:08:06 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 3647D40E78; Tue, 15 Feb 2022 12:08:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644923284; x=1676459284; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EMm3ifj1X3u54ppbFSFIDBT86VQh8draenZskeFIAfc=; b=MqWjMGCjZ+01bfgBipMJVP8hh5aeqz8bKqU8SVpC6WEdUng+BDn0XRFV xN0lAxe3qIeaZRK0k76jKxGsy5Q9RiHj+GfbDUWhbRRgtK7ZRZRVGNzQE g1tGXtYtIyEF9LfTE4slDyJ9lqPyvSvfgrzcM/s+h/tj7K40TYj7izQjy Jpl1zK4G+uFe07UjuRwQdVLDAtBpDpqltUyIiiWoggzp1M2NK9y+BZVGX 8E8a729mdlzSBSY82y27AC9Dg+QiU7rrhAqR1ZkHEcnNuX92cypTSJxkD C1RNRgEgeBO8sHO4GuckjoP/aVU0AJa7Qs2A6P3VwGi3x7FCE4LF/4MAT A==; X-IronPort-AV: E=McAfee;i="6200,9189,10258"; a="313603397" X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="313603397" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 03:08:03 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,370,1635231600"; d="scan'208";a="544247241" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.49]) by orsmga008.jf.intel.com with ESMTP; 15 Feb 2022 03:08:01 -0800 From: Ciara Power To: dev@dpdk.org Cc: stable@dpdk.org, john.mcnamara@intel.com, roy.fan.zhang@intel.com, Ciara Power , Pablo de Lara Subject: [PATCH] crypto/ipsec_mb: fix qp cleanup unreachable code Date: Tue, 15 Feb 2022 11:07:58 +0000 Message-Id: <20220215110758.149380-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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: stable@dpdk.org Signed-off-by: Ciara Power --- drivers/crypto/ipsec_mb/ipsec_mb_ops.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c index 1cf37e9836..7e8396b4a3 100644 --- a/drivers/crypto/ipsec_mb/ipsec_mb_ops.c +++ b/drivers/crypto/ipsec_mb/ipsec_mb_ops.c @@ -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); -- 2.25.1