From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30742 invoked by alias); 28 Feb 2011 04:23:17 -0000 Received: (qmail 30734 invoked by uid 22791); 28 Feb 2011 04:23:16 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 28 Feb 2011 04:23:08 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1S4Mv1J010509 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 27 Feb 2011 23:22:58 -0500 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p1S4MtbW011797 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 Feb 2011 23:22:57 -0500 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p1S4Msdi019226; Mon, 28 Feb 2011 05:22:54 +0100 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id p1S4Mr9U019218; Mon, 28 Feb 2011 05:22:53 +0100 Date: Mon, 28 Feb 2011 04:39:00 -0000 From: Jan Kratochvil To: Michael Snyder Cc: Pedro Alves , "gdb-patches@sourceware.org" , "drow@false.org" Subject: [commit] Compilation regression [Re: [RFA] Fix memory leak in gdbserver/hostio.c] Message-ID: <20110228042252.GA12861@host1.dyn.jankratochvil.net> References: <4D699B2E.3020107@vmware.com> <201102271705.43466.pedro@codesourcery.com> <4D6AC713.10800@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Disposition: inline In-Reply-To: <4D6AC713.10800@vmware.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-02/txt/msg00872.txt.bz2 On Sun, 27 Feb 2011 22:50:11 +0100, Michael Snyder wrote: > 2011-02-27 Michael Snyder > > * hostio.c (require_data): Free malloc memory before returning > error. > > --- hostio.c 1 Jan 2011 15:33:24 -0000 1.11 > +++ hostio.c 27 Feb 2011 21:48:00 -0000 > @@ -134,7 +134,10 @@ require_data (char *p, int p_len, char * > + xfree (data); = http://sourceware.org/ml/gdb-cvs/2011-02/msg00220.html hostio.c: In function ‘require_data’: hostio.c:138:7: error: implicit declaration of function ‘xfree’ [-Werror=implicit-function-declaration] cc1: all warnings being treated as errors make: *** [hostio.o] Error 1 It could not build as -Werror is there by default, could it? Checked in the fix. Regards, Jan http://sourceware.org/ml/gdb-cvs/2011-02/msg00227.html --- src/gdb/gdbserver/ChangeLog 2011/02/28 01:46:50 1.459 +++ src/gdb/gdbserver/ChangeLog 2011/02/28 04:20:29 1.460 @@ -1,3 +1,7 @@ +2011-02-28 Jan Kratochvil + + * hostio.c (require_data): Use free, not xfree. + 2011-02-27 Michael Snyder * server.c (handle_query): Discard unused value. --- src/gdb/gdbserver/hostio.c 2011/02/27 23:32:04 1.12 +++ src/gdb/gdbserver/hostio.c 2011/02/28 04:20:30 1.13 @@ -135,7 +135,7 @@ if (escaped) { - xfree (data); + free (data); return -1; }