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: [patch] unfreed memory in cli_command_loop




> 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.

Whoa, you're right, thanks for the catch.



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