From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17263 invoked by alias); 22 Dec 2008 13:25:19 -0000 Received: (qmail 17253 invoked by uid 22791); 22 Dec 2008 13:25:18 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,KAM_MX,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Dec 2008 13:24:33 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id mBMDOWiw004367 for ; Mon, 22 Dec 2008 08:24:32 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id mBMDOV0S011884; Mon, 22 Dec 2008 08:24:31 -0500 Received: from opsy.redhat.com (vpn-12-219.rdu.redhat.com [10.11.12.219]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id mBMDOUV8030743; Mon, 22 Dec 2008 08:24:30 -0500 Received: by opsy.redhat.com (Postfix, from userid 500) id CA410378623; Mon, 22 Dec 2008 06:24:29 -0700 (MST) To: gdb-patches@sourceware.org Subject: RFA: fix PR 8307 From: Tom Tromey Reply-To: tromey@redhat.com Date: Mon, 22 Dec 2008 13:25:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2008-12/txt/msg00374.txt.bz2 PR 8307 is about a small memory leak in environ.c. This is just the patch from the PR. Built and regtested on x86-64 (compile farm). Also I ran it under valgrind, before and after, to verify. Please review. Tom 2008-12-22 Adam Denton PR gdb/8307: * environ.c (free_environ): Free e->vector. diff --git a/gdb/environ.c b/gdb/environ.c index ee471ad..cd40193 100644 --- a/gdb/environ.c +++ b/gdb/environ.c @@ -49,6 +49,7 @@ free_environ (struct gdb_environ *e) while (*vector) xfree (*vector++); + xfree (e->vector); xfree (e); }