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 two memory leaks


Hi Keith,

Tsk, tsk, tsk - can we have two separate patches, please? :-)
Seriously, it does make it easier if we have unexpected regressions...

> ChangeLog
> 2012-10-23  Keith Seitz  <keiths@redhat.com>
> 
> 	* breakpoint.c (clear_command): Add cleanup for
> 	sals.sals if an argument is given.

This one looks good to me. But I'm wonderin if we shouldn't also
document the fact that decode_line_with_current_source returns
a structure that contains newly allocated memory?

> 	* linespec.c (parse_linespec): Do cleanups after
> 	parsing a convenience variable.

This one looks good to me too.

You might want to wait for a day or two before checking in, as these
files are not within my area of expertise. But I verified that the
memory is allocated on the heap, and leaked if not free'ed.

Cheers,
-- 
Joel


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