[EXTERNAL] [PATCH] examples/fips_validation: fix dangling pointer for SHA test

Finn, Emma emma.finn at intel.com
Fri Aug 29 12:18:07 CEST 2025


> -----Original Message-----
> From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
> Sent: Thursday 28 August 2025 10:42
> To: Finn, Emma <emma.finn at intel.com>
> Cc: dev at dpdk.org; Ji, Kai <kai.ji at intel.com>
> Subject: RE: [EXTERNAL] [PATCH] examples/fips_validation: fix dangling
> pointer for SHA test
> 
> > Set vector pointer to NULL after free to avoid calling rte_free() on
> > the same pointer twice in some cases.
> >
> > Signed-off-by: Emma Finn <emma.finn at intel.com>
> > ---
> >  examples/fips_validation/main.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/examples/fips_validation/main.c
> > b/examples/fips_validation/main.c index f21826e9d7..60ee9f8dd4 100644
> > --- a/examples/fips_validation/main.c
> > +++ b/examples/fips_validation/main.c
> > @@ -2612,7 +2612,7 @@ fips_mct_sha_test(void)
> >  		rte_free(md[i].val);
> >
> >  	rte_free(vec.pt.val);
> > -
> > +	vec.pt.val = NULL;
> 
> Same could be the case for fips_mct_shake_test also.
> 
Good catch, probably the same could happen with shake. 
I currently don’t have a way to test shake but I'm happy to make the change as part of this patch if you can test?

Thanks, 
Emma

> Thanks,
> Gowrishankar
> >  	rte_free(val.val);
> >  	return 0;
> >  }
> > --
> > 2.34.1



More information about the dev mailing list