From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 73A3B15808B for ; Sat, 12 Feb 2022 18:31:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9CFA4E0798; Sat, 12 Feb 2022 18:31:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5D7D7E0798 for ; Sat, 12 Feb 2022 18:31:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3493F342B3E for ; Sat, 12 Feb 2022 18:31:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 428A32D4 for ; Sat, 12 Feb 2022 18:31:12 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1644690637.46c32287c3a4f0905ba051dfbfba93973b81e157.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qmanifest.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 46c32287c3a4f0905ba051dfbfba93973b81e157 X-VCS-Branch: master Date: Sat, 12 Feb 2022 18:31:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f523f93a-d37d-475b-a317-b81ce5f4e151 X-Archives-Hash: dd2271ce787b9d097a58af9233fe1f2b commit: 46c32287c3a4f0905ba051dfbfba93973b81e157 Author: Fabian Groffen gentoo org> AuthorDate: Sat Feb 12 18:30:37 2022 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Feb 12 18:30:37 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=46c32287 qmanifest: fix Coverity resource leak CID 206540 Signed-off-by: Fabian Groffen gentoo.org> qmanifest.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qmanifest.c b/qmanifest.c index a00dbd2..72d6362 100644 --- a/qmanifest.c +++ b/qmanifest.c @@ -1,5 +1,5 @@ /* - * Copyright 2018-2019 Gentoo Foundation + * Copyright 2018-2021 Gentoo Foundation * Distributed under the terms of the GNU General Public License v2 * * Copyright 2018- Fabian Groffen - @@ -438,8 +438,10 @@ generate_dir(const char *dir, enum type_manifest mtype) return NULL; } - if (list_dir(&dentries, &dentrieslen, dir) != 0) + if (list_dir(&dentries, &dentrieslen, dir) != 0) { + gzclose(mf); return NULL; + } for (i = 0; i < dentrieslen; i++) { /* ignore existing Manifests */