From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17875 invoked by alias); 22 Aug 2007 02:02:23 -0000 Received: (qmail 17745 invoked by uid 22791); 22 Aug 2007 02:02:22 -0000 X-Spam-Check-By: sourceware.org Received: from mpv3.TIS.CWRU.Edu (HELO mpv3.TIS.cwru.edu) (129.22.105.35) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 22 Aug 2007 02:02:17 +0000 Received: from mpv6.tis.cwru.edu (mpv6.TIS.CWRU.Edu [129.22.104.221]) by mpv3.TIS.cwru.edu (MOS 3.8.5-GA) with ESMTP id BXY30386; Tue, 21 Aug 2007 22:02:14 -0400 (EDT) Received: from z4.local ([71.31.158.16]) by mpv6.tis.cwru.edu (MOS 3.8.3-GA) with ESMTP id CCV26085 (AUTH cpr); Tue, 21 Aug 2007 22:02:13 -0400 (EDT) Message-ID: <46CB9915.4050307@case.edu> Date: Wed, 22 Aug 2007 02:02: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> <46C7528D.2000002@case.edu> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Junkmail-Whitelist: YES (by domain whitelist at mpv3.cwru.edu) 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/msg00427.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. > > Not even if history_tokenize_internal's 'windp' argument falls in > whitespace between words? Yes, I think you're right. Thanks. 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/