[dpdk-dev] [PATCH] bus/fslmc: fix for resource leak coverity issue
Sachin Saxena
sachin.saxena at nxp.com
Thu Oct 31 12:16:57 CET 2019
> -----Original Message-----
> From: David Marchand <david.marchand at redhat.com>
> Sent: Friday, October 25, 2019 12:47 AM
> To: Sachin Saxena <sachin.saxena at nxp.com>
> Cc: Babu Radhakrishnan, AgalyaX <agalyax.babu.radhakrishnan at intel.com>;
> dev at dpdk.org; Pattan, Reshma <reshma.pattan at intel.com>; Hemant
> Agrawal <hemant.agrawal at nxp.com>; Parthasarathy, JananeeX M
> <jananeex.m.parthasarathy at intel.com>; stable at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] bus/fslmc: fix for resource leak coverity issue
>
> On Thu, Oct 3, 2019 at 10:43 AM Sachin Saxena <sachin.saxena at nxp.com>
> wrote:
> >
> >
> > > -----Original Message-----
> > > From: Babu Radhakrishnan, AgalyaX
> > > <agalyax.babu.radhakrishnan at intel.com>
> > > Sent: Tuesday, September 10, 2019 1:11 PM
> > > To: dev at dpdk.org
> > > Cc: Pattan, Reshma <reshma.pattan at intel.com>; Hemant Agrawal
> > > <hemant.agrawal at nxp.com>; Sachin Saxena <sachin.saxena at nxp.com>;
> > > Parthasarathy, JananeeX M <jananeex.m.parthasarathy at intel.com>;
> > > stable at dpdk.org
> > > Subject: RE: [PATCH] bus/fslmc: fix for resource leak coverity issue
> > > Importance: High
> > >
> > > Hi,
> > >
> > > > -----Original Message-----
> > > > From: Babu Radhakrishnan, AgalyaX
> > > > Sent: Tuesday, September 10, 2019 1:01 PM
> > > > To: dev at dpdk.org
> > > > Cc: Pattan, Reshma <reshma.pattan at intel.com>;
> > > hemant.agrawal at nxp.com;
> > > > sachin.saxena at nxp.com; Parthasarathy, JananeeX M
> > > > <jananeex.m.parthasarathy at intel.com>; Babu Radhakrishnan, AgalyaX
> > > > <agalyax.babu.radhakrishnan at intel.com>; stable at dpdk.org
> > > > Subject: [PATCH] bus/fslmc: fix for resource leak coverity issue
> > > >
> > > > From: Agalya Babu RadhaKrishnan
> > > <agalyax.babu.radhakrishnan at intel.com>
> > > >
> > > > 1 issue caught by 344967
> > > > Leaked_storage: Variable sep going out of scope leaks the storage
> > > > it points to.
> > > >
> > > > When 'sep' is not null and sep_exist is 0, 'sep' is freed before
> > > > going out of scope of the function irrespective of 'addr' exists or not.
> > > >
> > > > Coverity Issue: 344967
> > > > Fixes: e67a61614d0b ("bus/fslmc: support device iteration")
> > > > Cc: stable at dpdk.org
> > > >
> > > > Signed-off-by: Agalya Babu RadhaKrishnan
> > > > <agalyax.babu.radhakrishnan at intel.com>
> > > > ---
> > >
> > > if (strncmp("dpni", sep, 4) &&
> > > strncmp("dpseci", sep, 6) &&
> > > strncmp("dpcon", sep, 5) &
> > > .....
> > >
> > > We think validation of device name is done using AND operator
> > > instead it should be done by OR operator.
> > > Please confirm
> > [Sachin Saxena] The purpose of this logic to confirm that one of the device
> name should match to supported list and as soon as one strncmp() matches
> the string it will return 0 and the control comes out of IF condition.
> > So, existing logic is correct.
> >
>
> Should I understand this as a confirmation of the initial ACK?
>
[Sachin Saxena] Yes. please consider it as ACK. Thank you.
>
> --
> David Marchand
More information about the dev
mailing list