patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Zhang, Roy Fan" <roy.fan.zhang@intel.com>
To: "Power, Ciara" <ciara.power@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>,
	"Kovacevic, Marko" <marko.kovacevic@intel.com>
Subject: Re: [dpdk-stable] [PATCH v1 2/2] examples/fips_validation: fix resetting pointer
Date: Mon, 16 Aug 2021 15:22:20 +0000	[thread overview]
Message-ID: <BL0PR11MB304342D6BDE74400D8380614B8FD9@BL0PR11MB3043.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210812142436.108053-3-ciara.power@intel.com>

> -----Original Message-----
> From: Power, Ciara <ciara.power@intel.com>
> Sent: Thursday, August 12, 2021 3:25 PM
> To: dev@dpdk.org
> Cc: stable@dpdk.org; Zhang, Roy Fan <roy.fan.zhang@intel.com>; Power,
> Ciara <ciara.power@intel.com>; Kovacevic, Marko
> <marko.kovacevic@intel.com>
> Subject: [PATCH v1 2/2] 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: 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

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>

  reply	other threads:[~2021-08-16 15:22 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 ` [dpdk-stable] [PATCH v1 2/2] examples/fips_validation: fix resetting pointer Ciara Power
2021-08-16 15:22   ` Zhang, Roy Fan [this message]
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=BL0PR11MB304342D6BDE74400D8380614B8FD9@BL0PR11MB3043.namprd11.prod.outlook.com \
    --to=roy.fan.zhang@intel.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=marko.kovacevic@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).