From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: David Marchand <david.marchand@redhat.com>,
Akhil Goyal <gakhil@marvell.com>
Cc: dev <dev@dpdk.org>, Fan Zhang <roy.fan.zhang@intel.com>,
Brian Dooley <brian.dooley@intel.com>,
Anoob Joseph <anoobj@marvell.com>,
Archana Muniganti <marchana@marvell.com>,
Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
Thomas Monjalon <thomas@monjalon.net>
Subject: RE: [EXT] Re: [PATCH v2] examples/fips_validation: fix memory leak in sha test
Date: Mon, 4 Jul 2022 08:18:33 +0000 [thread overview]
Message-ID: <CO1PR18MB471433E4786E603FCA238622CBBE9@CO1PR18MB4714.namprd18.prod.outlook.com> (raw)
In-Reply-To: <CAJFAV8xVwc_L0S-cq1y6BOs5vkCnF=yYODKJPoDcDitnM=qpsg@mail.gmail.com>
> vec.cipher_auth.digest.len * 8);
> > + if (vec.cipher_auth.digest.val)
> > + free(vec.cipher_auth.digest.val);
>
> Unneeded if().
>
Ack.
> We just did a tree-wide cleanup to avoid these.
> Please don't reintroduce some.
>
>
> > +
> > + vec.cipher_auth.digest.val = calloc(1,
> > + vec.cipher_auth.digest.len);
>
> Don't we need to check for allocation success?
>
Sure. I ll post fix for the above and thanks for the review.
Regards,
Gowrishankar
>
> > break;
> > }
> > }
> >
> > - if (i == RTE_DIM(phsc))
> > + if (i == RTE_DIM(phsc)) {
> > + free(vec.cipher_auth.digest.val);
> > + vec.cipher_auth.digest.val = NULL;
> > return -1;
> > + }
> >
> > return 0;
> > }
>
>
> --
> David Marchand
next prev parent reply other threads:[~2022-07-04 8:18 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-02 14:51 [PATCH v1] " Gowrishankar Muthukrishnan
2022-07-02 14:58 ` [PATCH v2] " Gowrishankar Muthukrishnan
2022-07-04 7:48 ` David Marchand
2022-07-04 7:50 ` [EXT] " Akhil Goyal
2022-07-04 8:26 ` Thomas Monjalon
2022-07-04 8:18 ` Gowrishankar Muthukrishnan [this message]
2022-07-02 18:44 ` Gowrishankar Muthukrishnan
2022-07-04 7:00 ` Akhil Goyal
2022-07-04 9:55 ` [PATCH v3] " Gowrishankar Muthukrishnan
2022-07-04 10:34 ` Akhil Goyal
2022-07-04 17:32 ` 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=CO1PR18MB471433E4786E603FCA238622CBBE9@CO1PR18MB4714.namprd18.prod.outlook.com \
--to=gmuthukrishn@marvell.com \
--cc=anoobj@marvell.com \
--cc=brian.dooley@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=gakhil@marvell.com \
--cc=jerinj@marvell.com \
--cc=marchana@marvell.com \
--cc=roy.fan.zhang@intel.com \
--cc=thomas@monjalon.net \
/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).