From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22624 invoked by alias); 1 Jul 2007 15:39:01 -0000 Received: (qmail 22612 invoked by uid 22791); 1 Jul 2007 15:39:01 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 01 Jul 2007 15:38:59 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id AF337982BB; Sun, 1 Jul 2007 15:38:58 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 8F268982B8; Sun, 1 Jul 2007 15:38:58 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.67) (envelope-from ) id 1I51VM-0002v1-CO; Sun, 01 Jul 2007 11:38:28 -0400 Date: Sun, 01 Jul 2007 15:39:00 -0000 From: Daniel Jacobowitz To: msnyder@sonic.net Cc: gdb-patches@sourceware.org Subject: Re: [patch] unfreed memory in cli_command_loop Message-ID: <20070701153828.GB10872@caradoc.them.org> Mail-Followup-To: msnyder@sonic.net, gdb-patches@sourceware.org References: <18552.12.7.175.2.1183082732.squirrel@webmail.sonic.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <18552.12.7.175.2.1183082732.squirrel@webmail.sonic.net> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes 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-07/txt/msg00005.txt.bz2 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. -- Daniel Jacobowitz CodeSourcery