From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31745 invoked by alias); 18 Aug 2007 20:12:16 -0000 Received: (qmail 31718 invoked by uid 22791); 18 Aug 2007 20:12:15 -0000 X-Spam-Check-By: sourceware.org Received: from mpv4.TIS.CWRU.Edu (HELO mpv4.tis.cwru.edu) (129.22.105.34) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 18 Aug 2007 20:12:12 +0000 Received: from mpv2.tis.cwru.edu (mpv2.TIS.CWRU.Edu [129.22.105.37]) by mpv4.tis.cwru.edu (MOS 3.8.2-GA) with ESMTP id CDB69553; Sat, 18 Aug 2007 16:12:09 -0400 (EDT) Received: from z4.local (h97.254.40.69.ip.alltel.net [69.40.254.97]) by mpv2.tis.cwru.edu (MOS 3.8.2-GA) with ESMTP id CLI32651 (AUTH cpr); Sat, 18 Aug 2007 16:12:04 -0400 (EDT) Message-ID: <46C7528D.2000002@case.edu> Date: Sat, 18 Aug 2007 20:12:00 -0000 From: Chet Ramey Reply-To: chet.ramey@case.edu User-Agent: Thunderbird 2.0.0.6 (Macintosh/20070728) MIME-Version: 1.0 To: Jim Blandy CC: msnyder@sonic.net, bug-readline@gnu.org, gdb-patches@sourceware.org, chet@case.edu Subject: Re: [Bug-readline] Re: PATCH: readline/histexpand.c, resource leak References: <10015.12.7.175.2.1185934493.squirrel@webmail.sonic.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Status: score=10/49, host=mpv4.tis.cwru.edu X-Junkmail-SD-Raw: score=unknown, refid=str=0001.0A090202.46C75299.00A6,ss=1,fgs=0, ip=69.40.254.97, so=2006-09-22 03:48:54, dmn=5.3.14/2007-05-31 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-08/txt/msg00379.txt.bz2 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/