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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 986DF138350 for ; Sat, 25 Jan 2020 09:03:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C2B83E083E; Sat, 25 Jan 2020 09:03:13 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 31065E083E for ; Sat, 25 Jan 2020 09:03:13 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 393E434E383 for ; Sat, 25 Jan 2020 09:03:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BBDBB3E for ; Sat, 25 Jan 2020 09:03:09 +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: <1579891273.813b219d06e950f44d47d60d401d0e8c11073631.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: 813b219d06e950f44d47d60d401d0e8c11073631 X-VCS-Branch: master Date: Sat, 25 Jan 2020 09:03:09 +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: ec090bee-bc17-42b9-8db8-0bc3afc45988 X-Archives-Hash: 875d34a32b4616168a3fd2113a493a59 commit: 813b219d06e950f44d47d60d401d0e8c11073631 Author: Fabian Groffen gentoo org> AuthorDate: Fri Jan 24 18:41:13 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Jan 24 18:41:13 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=813b219d qmanifest: fix Coverity 206540 Resource leak Signed-off-by: Fabian Groffen gentoo.org> qmanifest.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qmanifest.c b/qmanifest.c index b4057bb..2a6d9b5 100644 --- a/qmanifest.c +++ b/qmanifest.c @@ -582,8 +582,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 */