Re: [PATCH 4/4] rt-tests: deadline_test: add missing frees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Thu, 4 Apr 2019, Kurt Kanzenbach wrote:

> Hi,
> 
> On Thu, Apr 04, 2019 at 05:13:51PM +0200, John Kacur wrote:
> >
> >
> > On Thu, 4 Apr 2019, Kurt Kanzenbach wrote:
> >
> > > The threads and thread data structures are allocated using calloc(). But never
> > > free'd. So, free them.
> > >
> > > While here, remove the if statement for setcpu_buf. Free() is NULL safe.
> > >
> > > Signed-off-by: Kurt Kanzenbach <kurt@xxxxxxxxxxxxx>
> > > ---
> > >  src/sched_deadline/deadline_test.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/src/sched_deadline/deadline_test.c b/src/sched_deadline/deadline_test.c
> > > index 4826557d0624..69e6fd18b73b 100644
> > > --- a/src/sched_deadline/deadline_test.c
> > > +++ b/src/sched_deadline/deadline_test.c
> > > @@ -2092,8 +2092,9 @@ int main (int argc, char **argv)
> > >  		printf("\n");
> > >  	}
> > >
> > > -	if (!setcpu_buf)
> > > -		free(setcpu_buf);
> > > +	free(thread);
> > > +	free(sched_data);
> > > +	free(setcpu_buf);
> > >
> > >  	return 0;
> > >  }
> > > --
> > > 2.11.0
> >
> > Does this remove your own if statement that I didn't even apply yet?
> > :)
> 
> No. That's a different binary. My patch was made against cyclicdeadline.
> 
> Thanks,
> Kurt

Ok, got it, thanks!

John



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux