From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gnu.wildebeest.org (gnu.wildebeest.org [45.83.234.184]) by sourceware.org (Postfix) with ESMTPS id 55F6E3858D33 for ; Tue, 28 Feb 2023 11:36:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 55F6E3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=klomp.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=klomp.org Received: from r6.localdomain (82-217-174-174.cable.dynamic.v4.ziggo.nl [82.217.174.174]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 18F3A30067AD for ; Tue, 28 Feb 2023 12:36:22 +0100 (CET) Received: by r6.localdomain (Postfix, from userid 1000) id 723E83401F8; Tue, 28 Feb 2023 12:36:21 +0100 (CET) Message-ID: <01aba3cc94b93e1204ee23052126cac6338fc576.camel@klomp.org> Subject: Re: [PATCH] libdw: Fix dwarf_getscopes memory leak on error From: Mark Wielaard To: elfutils-devel@sourceware.org Date: Tue, 28 Feb 2023 12:36:21 +0100 In-Reply-To: <20230222223901.1089881-1-mark@klomp.org> References: <20230222223901.1089881-1-mark@klomp.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 (3.46.4-1.fc37) MIME-Version: 1.0 X-Spam-Status: No, score=-3029.6 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi, On Wed, 2023-02-22 at 23:39 +0100, Mark Wielaard wrote: > When there is an error in dwarf_getscopes after the initial scopes > have been allocated, e.g. when looking for the inlined scopes, then > the scopes would leak. Fix this by explicitly free the scopes on error. >=20 > https://sourceware.org/bugzilla/show_bug.cgi?id=3D29434 I pushed this. Cheers, Mark