From 15bb59a5ebb7fdf4de18fdf11ba2f9b3a8ee9c32 Mon Sep 17 00:00:00 2001 From: Ciara Power Date: Thu, 12 Aug 2021 14:24:35 +0000 Subject: [PATCH] examples/fips_validation: fix resetting pointer The env.digest memory was freed, but the pointer was not set to NULL afterwards. This caused an "Invalid Memory" error, as the pointer tries to free twice. Fixes: 952e10cdad5e ("examples/fips_validation: support scatter gather list") Cc: stable@dpdk.org Signed-off-by: Ciara Power Acked-by: Fan Zhang --- examples/fips_validation/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c index c0e68b8848..b0de3d269a 100644 --- a/examples/fips_validation/main.c +++ b/examples/fips_validation/main.c @@ -1843,8 +1843,10 @@ error_one_case: fips_test_clear(); - if (env.digest) + if (env.digest) { rte_free(env.digest); + env.digest = NULL; + } if (env.mbuf) rte_pktmbuf_free(env.mbuf); -- 2.20.1