From patchwork Fri Jan 6 10:44:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 40087 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp755139wrt; Fri, 6 Jan 2023 02:44:52 -0800 (PST) X-Google-Smtp-Source: AMrXdXu7iDR764yBpxKQlot84UTAuhSwRGVHVV0YGt9oQjzj+ASUj8tKWuYDFMX5Epat/lKOx4D2 X-Received: by 2002:a17:906:6b18:b0:7d3:8159:f35d with SMTP id q24-20020a1709066b1800b007d38159f35dmr45204476ejr.9.1673001891998; Fri, 06 Jan 2023 02:44:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673001891; cv=none; d=google.com; s=arc-20160816; b=07S3X9pbyL30uxTrbK34i3Db9OkhGW73pJ/syEGdawnmwyU+DNcpQ7FGEdPLr9JYli F0sNBq26Pbz83f6wunEMyogmMJahP31G1g5QlWf4MRNpsv/GRM1F9q8dBs2gKaV5XGKr KMSwdiV45npacniOwFZLdBGqnLd0vDkLFRWsZTPw93g6+34kF7JoqZyHxKT/TgHQZwli OFr2ryeNZDNbroZbj8jDWug2dqaI1F/DPKcXPO0ImnO6N0yeaBtLAhnMSpRrkpltTzvj uciSy2At6ljSwusRJgHRitZKxet/szBx9wTtzNvlW2cubj4OqPM4Uqs1Ic8iGM7NAerV kpoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=F6HJKvbRPz86GH8W0ZZlPTfSWXJR8WIv/+Om+9GwX+I=; b=ejdjbAFjO4fAg7jgw4gFsqUGfDg5fgmlS/lrZXzfuXnfUYCxW5ACgVfg54gzWKNfgz 3umUTGSqu5htEwJwz/XecUD4GXBOvstwoZVIzQUOWHjqPJRn0ofJEgk8mYHtIOnXSZdX bpl4zqADPwWEM84kJDlNQULlAbdztsIXirGk4edEqtcrSBILbOgF42xVLdRP2fQ3Afdw yFLZwZi03grXPtGS0+he7XySTV60RWitzIfm29x3Nrs7gLercf2AHjGYNpCI1x7XwW+a 6j7V6sjvogpuYPqVetpxmC21YRkxr59x7da/VxIakxRtL0/PvuUebX9ujMP3ha6B4iKg Lv7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=yigqil9t; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id xe9-20020a170907318900b007c31c5206c5si998051ejb.436.2023.01.06.02.44.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 02:44:51 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=yigqil9t; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D319F3858430 for ; Fri, 6 Jan 2023 10:44:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D319F3858430 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673001886; bh=F6HJKvbRPz86GH8W0ZZlPTfSWXJR8WIv/+Om+9GwX+I=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=yigqil9tIJar8iDqy/QR13vvAMxerY2deampjafR6T4rVcmbTiLbKWVU7xqCXVEkZ l14kxuEwGDCQYLKbcvhEH85t9db+1KUFBwizTDXdp5TTT7bo1pnhlkVt/BXIfrMY6Q 2vZgRVV2gYnWT5F/zTlCxGYLT9HpytnGETz6rhPc= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 70F59385841D for ; Fri, 6 Jan 2023 10:44:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 70F59385841D Received: by mail-pl1-x62e.google.com with SMTP id p24so1274365plw.11 for ; Fri, 06 Jan 2023 02:44:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=F6HJKvbRPz86GH8W0ZZlPTfSWXJR8WIv/+Om+9GwX+I=; b=emp83O+VzqMQTEGjhBUySV/UgRMoiRFovYI+Pq9DOWhnzZ7PIjGVCbm+yibDjnSt/w a0afA2pk/niLeDOozCgBv7wqNBgCy5hKP0qDob9t+EX7EHdprSRyNZltQEsBWI78wH49 2Wvl9hsRf2BBJUrJ60JrqfxSr2CIv1J4wF0NBxrjg38wpwKJQXA7J7z7UNoyeOPLzml+ T+GBi7pzuqO5IUGZ9QhE6BDH5npuIye4CZu2tY7C1KoQ3pp63XMDx76I9sKZBIrTi5qf cZZ2gmksctjnKxWxH5EjY9B8kx75YlGPb3s43Da+PAvP+8geEaEpYC7QoHnj45RmS1cI tugQ== X-Gm-Message-State: AFqh2kqSgq8ISWBM8KCRz9Z+RPE7lWNVhZLYUnY3ZQSUbOmf+ks8v5ak jTPDtmUPoExTXyK/2F9nIF6XWcTRAus= X-Received: by 2002:a17:902:a510:b0:192:48d1:f06c with SMTP id s16-20020a170902a51000b0019248d1f06cmr50738972plq.35.1673001878441; Fri, 06 Jan 2023 02:44:38 -0800 (PST) Received: from squeak.grove.modra.org (158.106.96.58.static.exetel.com.au. [58.96.106.158]) by smtp.gmail.com with ESMTPSA id b4-20020a170902d50400b00192e0f0e021sm600149plg.257.2023.01.06.02.44.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Jan 2023 02:44:38 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 1283E1142D98; Fri, 6 Jan 2023 21:14:36 +1030 (ACDT) Date: Fri, 6 Jan 2023 21:14:36 +1030 To: binutils@sourceware.org Subject: Fix an aout memory leak Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3035.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Alan Modra via Binutils From: Alan Modra Reply-To: Alan Modra Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754269632106555017?= X-GMAIL-MSGID: =?utf-8?q?1754269632106555017?= * aoutx.h (aout_bfd_free_cached_info): Free line_buf. diff --git a/bfd/aoutx.h b/bfd/aoutx.h index ae3e917c880..6d6527640fe 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -2909,6 +2909,7 @@ NAME (aout, bfd_free_cached_info) (bfd *abfd) return true; #define BFCI_FREE(x) do { free (x); x = NULL; } while (0) + BFCI_FREE (adata (abfd).line_buf); BFCI_FREE (obj_aout_symbols (abfd)); #ifdef USE_MMAP obj_aout_external_syms (abfd) = 0;