[dpdk-dev] crypto/dpaa2_sec: fix the incorrect free usage for dpsec

Message ID 20170712123441.2942-3-akhil.goyal@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: Pablo de Lara Guarch
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Akhil Goyal July 12, 2017, 12:34 p.m. UTC
  dpseci is allocated using rte_calloc() but it is freed
using free(). Fixing it to use rte_free()

Fixes: e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")

Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

De Lara Guarch, Pablo July 12, 2017, 2:46 p.m. UTC | #1
> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal@nxp.com]
> Sent: Wednesday, July 12, 2017 1:35 PM
> To: dev@dpdk.org
> Cc: hemant.agrawal@nxp.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Doherty, Declan
> <declan.doherty@intel.com>; Akhil Goyal <akhil.goyal@nxp.com>
> Subject: [PATCH] crypto/dpaa2_sec: fix the incorrect free usage for dpsec
> 
> dpseci is allocated using rte_calloc() but it is freed using free(). Fixing it to
> use rte_free()
> 
> Fixes: e5cbdfc53765 ("crypto/dpaa2_sec: add basic operations")
> 
> Signed-off-by: Akhil Goyal <akhil.goyal@nxp.com>

Added Cc: stable@dpdk.org

Applied to dpdk-next-crypto.
Thanks,

Pablo
  

Patch

diff --git a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
index d6c3088..9f2c0d9 100644
--- a/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
+++ b/drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c
@@ -1705,7 +1705,7 @@  dpaa2_sec_dev_close(struct rte_cryptodev *dev)
 
 	/*Free the allocated memory for ethernet private data and dpseci*/
 	priv->hw = NULL;
-	free(dpseci);
+	rte_free(dpseci);
 
 	return 0;
 }