This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix memory leak in gdbserver/hostio.c


On Sunday 27 February 2011 21:50:11, Michael Snyder wrote:
> Pedro Alves wrote:
> > This is wrong.  If any predicate other than require_data in if above
> > returned true, then you'll be freeing a garbage pointer.  I'd
> > fix this in require_data ... just free the output buffer when
> > returning error, so the callers never have to.
> 
> Like this?

Yes, thanks.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]