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

Akhil Goyal akhil.goyal at nxp.com
Wed Jul 12 14:34:41 CEST 2017


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 at nxp.com>
---
 drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }
-- 
2.9.3



More information about the dev mailing list