From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19295 invoked by alias); 27 Aug 2009 17:45:59 -0000 Received: (qmail 19287 invoked by uid 22791); 27 Aug 2009 17:45:58 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 27 Aug 2009 17:45:51 +0000 Received: from jupiter.vmware.com (mailhost5.vmware.com [10.16.68.131]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 15FF432000; Thu, 27 Aug 2009 10:45:49 -0700 (PDT) Received: from [10.20.94.141] (msnyder-server.eng.vmware.com [10.20.94.141]) by jupiter.vmware.com (Postfix) with ESMTP id 0F01EDC058; Thu, 27 Aug 2009 10:45:49 -0700 (PDT) Message-ID: <4A96C677.5060402@vmware.com> Date: Thu, 27 Aug 2009 18:28:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Jiang Jilin CC: "teawater@gmail.com" , "gdb-patches@sourceware.org" Subject: Re: [PATCH] fixed the memory leak in record.c References: <> <1251342694-17525-1-git-send-email-freephp@gmail.com> In-Reply-To: <1251342694-17525-1-git-send-email-freephp@gmail.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2009-08/txt/msg00488.txt.bz2 Jiang Jilin wrote: > * record.c (record_list_release_next) : fixed memory leak when record type is record_reg > > Signed-off-by: Jiang Jilin Looks correct to me, though I'd like to hear "ok" from Hui Zhu too. The change is short enough to accept without a copyright assignment. For future reference, we like to see a full ChangeLog entry with a header that would look something like this (it's ok this time): 2009-08-27 Jiang Jilin * record.c (...): ... Thank you! > --- > gdb/record.c | 7 ++++--- > 1 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/gdb/record.c b/gdb/record.c > index 8afca6b..07e9e80 100644 > --- a/gdb/record.c > +++ b/gdb/record.c > @@ -158,9 +158,10 @@ record_list_release_next (void) > { > rec = tmp->next; > if (tmp->type == record_reg) > - record_insn_num--; > - else if (tmp->type == record_reg) > - xfree (tmp->u.reg.val); > + { > + record_insn_num--; > + xfree (tmp->u.reg.val); > + } > else if (tmp->type == record_mem) > xfree (tmp->u.mem.val); > xfree (tmp);