This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [Bug-readline] Re: PATCH: readline/histexpand.c, resource leak
- From: Chet Ramey <chet dot ramey at case dot edu>
- To: Jim Blandy <jimb at codesourcery dot com>
- Cc: msnyder at sonic dot net, bug-readline at gnu dot org, gdb-patches at sourceware dot org, chet at case dot edu
- Date: Sat, 18 Aug 2007 16:11:57 -0400
- Subject: Re: [Bug-readline] Re: PATCH: readline/histexpand.c, resource leak
- References: <10015.12.7.175.2.1185934493.squirrel@webmail.sonic.net> <m3d4xpr7i7.fsf@codesourcery.com>
- Reply-to: chet dot ramey at case dot edu
Jim Blandy wrote:
> It seems to me that 'words' is a malloc'ed array of malloc'ed strings,
> so 'free (words)' still leaks storage.
I don't believe there's a case where wind == -1 and any malloced strings
exist in words[]. There's no leak unless that can happen.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Live Strong. No day but today.
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/