patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ciara Power <ciara.power@intel.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, roy.fan.zhang@intel.com,
	Ciara Power <ciara.power@intel.com>,
	Marko Kovacevic <marko.kovacevic@intel.com>
Subject: [dpdk-stable] [PATCH v1 2/2] examples/fips_validation: fix resetting pointer
Date: Thu, 12 Aug 2021 14:24:35 +0000
Message-ID: <20210812142436.108053-3-ciara.power@intel.com> (raw)
In-Reply-To: <20210812142436.108053-1-ciara.power@intel.com>

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: roy.fan.zhang@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 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 2db00620ce..5d14513a58 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1846,8 +1846,10 @@ fips_test_one_file(void)
 
 	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.25.1


  parent reply	other threads:[~2021-08-12 14:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12 14:24 [dpdk-stable] [PATCH v1 0/2] fips validation app fixes Ciara Power
2021-08-12 14:24 ` [dpdk-stable] [PATCH v1 1/2] examples/fips_validation: fix unused malloc Ciara Power
2021-08-16 15:21   ` Zhang, Roy Fan
2021-08-12 14:24 ` Ciara Power [this message]
2021-08-16 15:22   ` [dpdk-stable] [PATCH v1 2/2] examples/fips_validation: fix resetting pointer Zhang, Roy Fan
2021-10-05  8:17 ` [dpdk-stable] [EXT] [dpdk-dev] [PATCH v1 0/2] fips validation app fixes Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210812142436.108053-3-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@intel.com \
    --cc=roy.fan.zhang@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ http://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git