From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 0988AA00E6 for ; Wed, 17 Apr 2019 12:38:29 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 331601B5EC; Wed, 17 Apr 2019 12:38:27 +0200 (CEST) Received: from inva021.nxp.com (inva021.nxp.com [92.121.34.21]) by dpdk.org (Postfix) with ESMTP id 80F241B5EA; Wed, 17 Apr 2019 12:38:26 +0200 (CEST) Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 2F6B62000CB; Wed, 17 Apr 2019 12:38:26 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id C9F5B20011C; Wed, 17 Apr 2019 12:38:23 +0200 (CEST) Received: from GDB1.ap.freescale.net (GDB1.ap.freescale.net [10.232.132.179]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 6F9D4402B7; Wed, 17 Apr 2019 18:38:20 +0800 (SGT) From: Akhil Goyal To: dev@dpdk.org Cc: hemant.agrawal@nxp.com, akhil.goyal@nxp.com, stable@dpdk.org Date: Wed, 17 Apr 2019 15:58:14 +0530 Message-Id: <20190417102814.6375-1-akhil.goyal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190417095922.5394-1-akhil.goyal@nxp.com> References: <20190417095922.5394-1-akhil.goyal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v2] drivers/crypto: fix session destroy for dpaa and dpaa2 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190417102814.gw1skOeqHd8t1cv1xKjDTZ00W76XCI9vB_1Rs8SRb2g@z> Fixes: 1f14d500bce1 ("crypto/dpaa_sec: support IPsec protocol offload") Fixes: 0a23d4b6f4c2 ("crypto/dpaa2_sec: support protocol offload IPsec") Coverity issue: 336798 Cc: stable@dpdk.org Signed-off-by: Akhil Goyal --- v2: fix checkpatch drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +- drivers/crypto/dpaa_sec/dpaa_sec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c index 5b72b9ee4..0d273bb62 100644 --- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c +++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c @@ -2836,7 +2836,7 @@ dpaa2_sec_security_session_destroy(void *dev __rte_unused, rte_free(s->ctxt); rte_free(s->cipher_key.data); rte_free(s->auth_key.data); - memset(sess, 0, sizeof(dpaa2_sec_session)); + memset(s, 0, sizeof(dpaa2_sec_session)); set_sec_session_private_data(sess, NULL); rte_mempool_put(sess_mp, sess_priv); } diff --git a/drivers/crypto/dpaa_sec/dpaa_sec.c b/drivers/crypto/dpaa_sec/dpaa_sec.c index 8305f19a3..d9a7cd8a4 100644 --- a/drivers/crypto/dpaa_sec/dpaa_sec.c +++ b/drivers/crypto/dpaa_sec/dpaa_sec.c @@ -2453,7 +2453,7 @@ dpaa_sec_security_session_destroy(void *dev __rte_unused, rte_free(s->cipher_key.data); rte_free(s->auth_key.data); - memset(sess, 0, sizeof(dpaa_sec_session)); + memset(s, 0, sizeof(dpaa_sec_session)); set_sec_session_private_data(sess, NULL); rte_mempool_put(sess_mp, sess_priv); } -- 2.17.1