From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20455 invoked by alias); 9 Mar 2011 19:56:11 -0000 Received: (qmail 20446 invoked by uid 22791); 9 Mar 2011 19:56:11 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,T_RP_MATCHES_RCVD 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; Wed, 09 Mar 2011 19:56:04 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 34B1713466 for ; Wed, 9 Mar 2011 11:56:02 -0800 (PST) Received: from msnyder-server.eng.vmware.com (promd-2s-dhcp138.eng.vmware.com [10.20.124.138]) by mailhost2.vmware.com (Postfix) with ESMTP id 293D38EE8E for ; Wed, 9 Mar 2011 11:56:02 -0800 (PST) Message-ID: <4D77DB51.3070500@vmware.com> Date: Wed, 09 Mar 2011 19:56:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.24 (X11/20101201) MIME-Version: 1.0 To: "binutils@sourceware.org" Subject: [RFA/gas] config/obj-elf.c (obj_elf_section): Free malloced name. Content-Type: multipart/mixed; boundary="------------050001060001000308060000" Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00187.txt.bz2 This is a multi-part message in MIME format. --------------050001060001000308060000 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 26 Plug a memory leak. OK? --------------050001060001000308060000 Content-Type: text/plain; name="obj-elf.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="obj-elf.txt" Content-length: 1034 2011-03-09 Michael Snyder * obj-elf.c (obj_elf_section): Free malloced name. Index: obj-elf.c =================================================================== RCS file: /cvs/src/src/gas/config/obj-elf.c,v retrieving revision 1.138 diff -u -p -r1.138 obj-elf.c --- obj-elf.c 6 Mar 2011 14:05:24 -0000 1.138 +++ obj-elf.c 9 Mar 2011 19:51:44 -0000 @@ -984,6 +984,7 @@ obj_elf_section (int push) if (beg == NULL) { ignore_rest_of_line (); + xfree (name); return; } attr |= obj_elf_parse_section_letters (beg, strlen (beg), &clone); @@ -1003,6 +1004,7 @@ obj_elf_section (int push) if (beg == NULL) { ignore_rest_of_line (); + xfree (name); return; } type = obj_elf_section_type (beg, strlen (beg), TRUE); @@ -1084,6 +1086,7 @@ obj_elf_section (int push) { as_bad (_("character following name is not '#'")); ignore_rest_of_line (); + xfree (name); return; } beg = ++input_line_pointer; --------------050001060001000308060000--