From patchwork Wed Feb 15 11:34:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 57485 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp138164wrn; Wed, 15 Feb 2023 03:34:34 -0800 (PST) X-Google-Smtp-Source: AK7set+CcYDhV0EmR2GIWWhdLjFPcEvo9C3J+s+C0OH9m5yda7hBGVD8LAHqyZuPyJTp+zrRsxWm X-Received: by 2002:aa7:cd4d:0:b0:4ab:4cf0:4ab3 with SMTP id v13-20020aa7cd4d000000b004ab4cf04ab3mr1533250edw.38.1676460874172; Wed, 15 Feb 2023 03:34:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676460874; cv=none; d=google.com; s=arc-20160816; b=PzXKCryZvNG5Y0dLGazWuzsz/+j+fNnZTVGFOBy1ZfAZs6pfe5d21lFmwBdM/tHDLZ w5AOlwEbTw1ZNS7Hxyq1b0ETbuYElhI5s2UK4WyYOIfFnXUD876TxRylXASbtCelmi3I FN+uux6Zng3Ty2XHoJv6AYJrG6Ph/sd+hI1VN3cyN6lAXea4bRa14LOIj9PIIuCiuOMp njVJvCVSC4BuShI0haeNhyc5lHGoFC6vEZd9EFSKQ6JUit+drx9piN7EZfbDiESEAf11 LRaiTXWztqVTDFbSueqUQxdsbbXgIHMTeg3Ncuq2CVqZjDG0jGopCEmk4TBEv6WUIkz+ r2Ug== 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=fDmvfHEdhatynKesiy1wep0A7t7x50y2B2eJ1bkWprU=; b=o4Y4qSsIBCasPGU/QEeEOc3TPTt3bt/4zIIgf0AFAgcBdLOB8QHED0gwgT2wrtLm1l 3hElcEcpcbRZkrxR7YOrNjzunAnW759U+FyRAqkJhrt+5O/6MpCWMzHOIfVNI8eCIEMv n6m26kIP1XW6/EnEl8t80QW2wbWBQMUi31LxSbwwpqgKcPGgfWLQrUQbR/sfJ7PM3rr1 1T/gjcS2RTrsWrC0i1XfeT7DXdj5cxXATDc19B2+XcKatXV8pMoKkOQ8vjN6kiptpPVT 3lo0xAUkCvOaTagEm9Kq7sUe/wU9ouIexafmprx26FZsf+HMtgoKrPa20QoytTZ/W2dv OKVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=ndhWC6XX; 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 e26-20020a056402089a00b004ab4b753aabsi15777033edy.386.2023.02.15.03.34.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 03:34:34 -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=ndhWC6XX; 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 C5322385843E for ; Wed, 15 Feb 2023 11:34:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5322385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1676460870; bh=fDmvfHEdhatynKesiy1wep0A7t7x50y2B2eJ1bkWprU=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ndhWC6XXpYG2RMAB0QSrP0r2FvOLMKrdXXgt3yf1u9tR3y5T4WCcVLlUsVYLDuIZu ppUKLp1JeWE5SjH5OwktGplfIydUSoBMmQUZUwd2vs8rDCMd2HSzvvyru4waXGBdK4 zYjC0j/oOKh2Pa78Kxad4Hn/VFHd0y2oHdvyM8ek= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 1B32A3858D33 for ; Wed, 15 Feb 2023 11:34:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1B32A3858D33 Received: by mail-pl1-x636.google.com with SMTP id k13so20006084plg.0 for ; Wed, 15 Feb 2023 03:34:21 -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=fDmvfHEdhatynKesiy1wep0A7t7x50y2B2eJ1bkWprU=; b=1Hq63VBazpUIyfm2dEcXiWgzDTvV1QJVntIDmaOhQl8T854GZcYIXwlHzDIsN+uksJ /+T4tcjwFGrfKB/um55blXmspznT3I9rqQwcEB+80/iY4ihNRsUgAo9s5SfNZE9HuK+3 ztQTd+rVHJox+5E+eM1jWYWu3vySDlfO9antAb2H/34WGb3Mlu30T84HEzsiDD3Cqsfv YktwxnnOLpls1zV9uzMVNNspKG1UbCeY0Cf6flstQyumvNp+xr+4sR8EFgr7GZHU6JG7 Ty1LOmZ5AJiOM5bYxBvUsNGlDTiKl9G9sTbGkGZSVUmEE1swXEjhleMhCpgydHDlcDUr g/qQ== X-Gm-Message-State: AO0yUKU4FULOzjmXIWUwEXklHTbRU1KSzQ0BJMCR9MDi2OqtdAZYPPwS pu4cnp2G4zcKspmydFa155pnpswShdc= X-Received: by 2002:a17:903:2445:b0:198:fca8:2108 with SMTP id l5-20020a170903244500b00198fca82108mr2331533pls.44.1676460859253; Wed, 15 Feb 2023 03:34:19 -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 q12-20020a170902b10c00b0019ac9c9ce16sm1285523plr.138.2023.02.15.03.34.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Feb 2023 03:34:18 -0800 (PST) Received: by squeak.grove.modra.org (Postfix, from userid 1000) id 76E771141981; Wed, 15 Feb 2023 22:04:16 +1030 (ACDT) Date: Wed, 15 Feb 2023 22:04:16 +1030 To: binutils@sourceware.org Subject: objdump -G memory leak Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-3035.5 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?1757896637180669644?= X-GMAIL-MSGID: =?utf-8?q?1757896637180669644?= * objdump.c (find_stabs_section): Free stabs. diff --git a/binutils/objdump.c b/binutils/objdump.c index 9dd1ebd4da0..8a8bfba5c76 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -4603,7 +4603,10 @@ find_stabs_section (bfd *abfd, asection *section, void *names) { stabs = read_section_stabs (abfd, section->name, &stab_size, NULL); if (stabs) - print_section_stabs (abfd, section->name, &sought->string_offset); + { + print_section_stabs (abfd, section->name, &sought->string_offset); + free (stabs); + } } } }