From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1711 invoked by alias); 23 Oct 2012 22:02:43 -0000 Received: (qmail 1697 invoked by uid 22791); 23 Oct 2012 22:02:42 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Oct 2012 22:02:38 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2C2C11C74B6; Tue, 23 Oct 2012 18:02:38 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KoPL6TthKs-7; Tue, 23 Oct 2012 18:02:38 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 147E51C73A4; Tue, 23 Oct 2012 18:02:38 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id E1957C7F78; Tue, 23 Oct 2012 18:02:36 -0400 (EDT) Date: Tue, 23 Oct 2012 22:02:00 -0000 From: Joel Brobecker To: Keith Seitz Cc: "gdb-patches@sourceware.org ml" Subject: Re: [RFA] Fix two memory leaks Message-ID: <20121023220236.GG3555@adacore.com> References: <50870A74.80903@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50870A74.80903@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2012-10/txt/msg00430.txt.bz2 Hi Keith, Tsk, tsk, tsk - can we have two separate patches, please? :-) Seriously, it does make it easier if we have unexpected regressions... > ChangeLog > 2012-10-23 Keith Seitz > > * breakpoint.c (clear_command): Add cleanup for > sals.sals if an argument is given. This one looks good to me. But I'm wonderin if we shouldn't also document the fact that decode_line_with_current_source returns a structure that contains newly allocated memory? > * linespec.c (parse_linespec): Do cleanups after > parsing a convenience variable. This one looks good to me too. You might want to wait for a day or two before checking in, as these files are not within my area of expertise. But I verified that the memory is allocated on the heap, and leaked if not free'ed. Cheers, -- Joel