From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3746 invoked by alias); 27 Jan 2014 00:12:24 -0000 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 Received: (qmail 3644 invoked by uid 89); 27 Jan 2014 00:12:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f47.google.com Received: from mail-pa0-f47.google.com (HELO mail-pa0-f47.google.com) (209.85.220.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 27 Jan 2014 00:12:22 +0000 Received: by mail-pa0-f47.google.com with SMTP id kp14so5246396pab.20 for ; Sun, 26 Jan 2014 16:12:21 -0800 (PST) X-Received: by 10.66.141.165 with SMTP id rp5mr27270769pab.90.1390781540972; Sun, 26 Jan 2014 16:12:20 -0800 (PST) Received: from bubble.grove.modra.org ([101.166.26.37]) by mx.google.com with ESMTPSA id i10sm70432221pat.11.2014.01.26.16.12.19 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 16:12:20 -0800 (PST) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 0D041EA00E1; Mon, 27 Jan 2014 10:42:15 +1030 (CST) Date: Mon, 27 Jan 2014 00:12:00 -0000 From: Alan Modra To: Jan Kratochvil Cc: Binutils Subject: Re: [patch] Fix PowerPC targets minor memory leaks found by Coverity Message-ID: <20140127001215.GI5390@bubble.grove.modra.org> Mail-Followup-To: Jan Kratochvil , Binutils References: <20140124133831.GA27933@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140124133831.GA27933@host2.jankratochvil.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00312.txt.bz2 On Fri, Jan 24, 2014 at 02:38:31PM +0100, Jan Kratochvil wrote: > * coff-rs6000.c (xcoff_write_archive_contents_big): Free OFFSETS in > return paths. Three times. This is OK. > * elf32-ppc.c (ppc_elf_relax_section): Free FIXUPS in error_return > return path. This is not OK. There are paths to error_return before fixups have been allocated and after fixups have been freed. Please change the error_return free of fixups from a do { } while (); to a while () { } loop. OK with that change. > * elf64-ppc.c (ppc64_elf_link_hash_table_create): Free HTAB in all > return paths. > (ppc64_elf_tls_optimize): Free TOC_REF in return path. > (ppc64_elf_edit_toc): Free USED in return path. These are OK. -- Alan Modra Australia Development Lab, IBM