This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Stop leaking extra_string
- From: Pedro Alves <palves at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Wed, 20 Mar 2013 19:14:38 +0000
- Subject: Re: [RFA] Stop leaking extra_string
- References: <514A08A5 dot 6020504 at redhat dot com>
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