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>,
	damianx.nowak@intel.com,
	Marko Kovacevic <marko.kovacevic@intel.com>
Subject: [dpdk-stable] [PATCH v1 1/2] examples/fips_validation: fix unused malloc
Date: Thu, 12 Aug 2021 14:24:34 +0000	[thread overview]
Message-ID: <20210812142436.108053-2-ciara.power@intel.com> (raw)
In-Reply-To: <20210812142436.108053-1-ciara.power@intel.com>

The val.val pointer is allocated memory, however this memory is then
freed in get_writeback_data() without being used beforehand.
The pointer is then allocated memory again before use,
so the very first allocation is removed as it was unnecessary.

Fixes: f4797bae0050 ("examples/fips_validation: support plain SHA")
Cc: damianx.nowak@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 examples/fips_validation/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/examples/fips_validation/main.c b/examples/fips_validation/main.c
index c175fe6ac2..2db00620ce 100644
--- a/examples/fips_validation/main.c
+++ b/examples/fips_validation/main.c
@@ -1635,7 +1635,6 @@ fips_mct_sha_test(void)
 	int ret;
 	uint32_t i, j;
 
-	val.val = rte_malloc(NULL, (MAX_DIGEST_SIZE*SHA_MD_BLOCK), 0);
 	for (i = 0; i < SHA_MD_BLOCK; i++)
 		md[i].val = rte_malloc(NULL, (MAX_DIGEST_SIZE*2), 0);
 
-- 
2.25.1


  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 ` Ciara Power [this message]
2021-08-16 15:21   ` [dpdk-stable] [PATCH v1 1/2] examples/fips_validation: fix unused malloc Zhang, Roy Fan
2021-08-12 14:24 ` [dpdk-stable] [PATCH v1 2/2] examples/fips_validation: fix resetting pointer Ciara Power
2021-08-16 15:22   ` 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-2-ciara.power@intel.com \
    --to=ciara.power@intel.com \
    --cc=damianx.nowak@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).