From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29620 invoked by alias); 11 Nov 2009 16:47:17 -0000 Received: (qmail 29600 invoked by uid 22791); 11 Nov 2009 16:47:15 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS 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; Wed, 11 Nov 2009 16:47:06 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id nABGl4Je030000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 11 Nov 2009 11:47:04 -0500 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id nABGl0mU012353 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 11 Nov 2009 11:47:03 -0500 Message-ID: <4AFAEA84.8090705@redhat.com> Date: Wed, 11 Nov 2009 16:47:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20091014 Fedora/3.0-2.8.b4.fc11 Lightning/1.0pre Thunderbird/3.0b4 MIME-Version: 1.0 To: tromey@redhat.com CC: gdb-patches@sourceware.org Subject: Re: [RFA] Add parsing support for C++ operators References: <4AFA0A93.7040709@redhat.com> In-Reply-To: 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-11/txt/msg00255.txt.bz2 On 11/11/2009 07:11 AM, Tom Tromey wrote: >>>>>> "Keith" == Keith Seitz writes: > Keith> + | OPERATOR ptype > Keith> + { char *name; > Keith> + long length; > Keith> + struct ui_file *buf = mem_fileopen (); > Keith> + > Keith> + c_print_type ($2, NULL, buf, -1, 0); > Keith> + name = ui_file_xstrdup (buf,&length); > Keith> + ui_file_delete (buf); > Keith> + $$ = operator_stoken (name); > > This leaks 'name', you need a free after the call to operator_stoken. Indeed! Overzealous pre-submission cleanup... > This is ok with the above change. Thanks. I have committed this patch. Thank you for reviewing it. Keith