This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] unfreed memory in cli_command_loop
- From: msnyder at sonic dot net
- To: msnyder at sonic dot net, gdb-patches at sourceware dot org
- Date: Mon, 2 Jul 2007 18:56:46 -0700 (PDT)
- Subject: Re: [patch] unfreed memory in cli_command_loop
- References: <18552.12.7.175.2.1183082732.squirrel@webmail.sonic.net> <20070701153828.GB10872@caradoc.them.org>
> On Thu, Jun 28, 2007 at 07:05:32PM -0700, Michael Snyder wrote:
>> Minor memory leak. I checked to make sure that readline makes
>> and keeps its own copy of this string, so it's OK for us to
>> free our copy.
>
> Seems fine, but I'm not really sure when that cleanup is going to be
> called. We're outside the command loop here so it hasn't recorded a
> watermark to clean back to. Does it ever get run? If not, you could
> use alloca and avoid the whole issue.
Withdrawn, will resubmit.