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 40023158088 for ; Sun, 6 Feb 2022 14:29:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F7D12BC01E; Sun, 6 Feb 2022 14:29:07 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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 pigeon.gentoo.org (Postfix) with ESMTPS id 4F31D2BC023 for ; Sun, 6 Feb 2022 14:29:06 +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 2F74B342D3C for ; Sun, 6 Feb 2022 14:29:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9BEB42C8 for ; Sun, 6 Feb 2022 14:29:03 +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: <1644157740.db6aebe9a1033dc123e69bdacd5ae8d4d2290c4a.grobian@gentoo> Subject: [gentoo-commits] proj/portage-utils:master commit in: / X-VCS-Repository: proj/portage-utils X-VCS-Files: qmerge.c X-VCS-Directories: / X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: db6aebe9a1033dc123e69bdacd5ae8d4d2290c4a X-VCS-Branch: master Date: Sun, 6 Feb 2022 14:29:03 +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: d2bca621-28cd-4d45-8b23-dba147a39f95 X-Archives-Hash: 05efe94d9f4fd4b85cbbc3204c7f1efd commit: db6aebe9a1033dc123e69bdacd5ae8d4d2290c4a Author: Fabian Groffen gentoo org> AuthorDate: Sun Feb 6 14:29:00 2022 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Feb 6 14:29:00 2022 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=db6aebe9 qmerge: free up some resources Signed-off-by: Fabian Groffen gentoo.org> qmerge.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/qmerge.c b/qmerge.c index a856aaa..e247a38 100644 --- a/qmerge.c +++ b/qmerge.c @@ -1133,6 +1133,7 @@ pkg_merge(int level, const depend_atom *qatom, const tree_match_ctx *mpkg) if (vdbfd == -1) err("failed to open vdb extraction directory"); tbz2size = xpak_extract(mpkg->path, &vdbfd, pkg_extract_xpak_cb); + close(vdbfd); } if (tbz2size <= 0) err("%s appears not to be a valid tbz2 file", mpkg->path); @@ -2062,5 +2063,11 @@ int qmerge_main(int argc, char **argv) ret = qmerge_run(todo); if (todo != NULL) free_set(todo); + + if (_qmerge_binpkg_tree != NULL) + tree_close(_qmerge_binpkg_tree); + if (_qmerge_vdb_tree != NULL) + tree_close(_qmerge_vdb_tree); + return ret; }