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] Stop leaking extra_string


On 03/20/2013 07:06 PM, Keith Seitz wrote:

> ChangeLog
> 2013-03-20  Keith Seitz  <keiths@redhat.com>
> 
>     * breakpoint.h (struct breakpoint): Add comment to
>     extra_string indicating that this member is mallod'd.
>     * breakpoint.c (base_breakpoint_dtor): Free extra_string.

This is fine, thanks.

When we get to this bit in addr_string_to_sals (called through
breakpoint_re_set_default):

	  if (cond_string)
	    b->cond_string = cond_string;
	  b->thread = thread;
	  b->task = task;
	  if (extra_string)
	    b->extra_string = extra_string;
	  b->condition_not_parsed = 0;

Is b->extra_string always NULL here, or could we be
leaking it here too?

-- 
Pedro Alves


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