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 81EA8138351 for ; Sun, 19 Jan 2020 19:36:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4EDEE0A00; Sun, 19 Jan 2020 19:36:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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 AE5EFE0A00 for ; Sun, 19 Jan 2020 19:36:16 +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 DA63334E267 for ; Sun, 19 Jan 2020 19:36:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 226DC11F for ; Sun, 19 Jan 2020 19:36:13 +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: <1579462479.36a4fa02b2315b117b320139e8cac25f31930219.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: 36a4fa02b2315b117b320139e8cac25f31930219 X-VCS-Branch: master Date: Sun, 19 Jan 2020 19:36:13 +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: 2ef6ed9c-12b3-4498-9773-c711c24f79d4 X-Archives-Hash: 9d723881c5e5c664f363d64300a68cf4 commit: 36a4fa02b2315b117b320139e8cac25f31930219 Author: Fabian Groffen gentoo org> AuthorDate: Sun Jan 19 19:34:39 2020 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sun Jan 19 19:34:39 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=36a4fa02 qmerge: fix Coverity 206531 Double close Signed-off-by: Fabian Groffen gentoo.org> qmerge.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmerge.c b/qmerge.c index e22f22f..6988285 100644 --- a/qmerge.c +++ b/qmerge.c @@ -767,7 +767,8 @@ merge_tree_at(int fd_src, const char *src, int fd_dst, const char *dst, return ret; } - dir = fdopendir(subfd_src); + i = dup(subfd_src); /* fdopendir closes its argument */ + dir = fdopendir(i); if (!dir) goto done;