From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id 5B8963857817; Tue, 14 Sep 2021 15:05:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B8963857817 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: pipes: always close read side pipe handle in error case X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/master X-Git-Oldrev: 464f7145f650e85f89ac288355d4daba7e682156 X-Git-Newrev: b12cf6b3cf1557a73b899f8064389966e52d5949 Message-Id: <20210914150559.5B8963857817@sourceware.org> Date: Tue, 14 Sep 2021 15:05:59 +0000 (GMT) X-BeenThere: cygwin-cvs@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component git logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2021 15:05:59 -0000 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b12cf6b3cf1557a73b899f8064389966e52d5949 commit b12cf6b3cf1557a73b899f8064389966e52d5949 Author: Corinna Vinschen Date: Fri Sep 3 10:25:29 2021 +0200 Cygwin: pipes: always close read side pipe handle in error case Add missing CloseHandle. Signed-off-by: Corinna Vinschen Diff: --- winsup/cygwin/fhandler_pipe.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc index 85ab3cf55..14f28f02c 100644 --- a/winsup/cygwin/fhandler_pipe.cc +++ b/winsup/cygwin/fhandler_pipe.cc @@ -608,6 +608,7 @@ fhandler_pipe::create (fhandler_pipe *fhs[2], unsigned psize, int mode) else if ((fhs[1] = (fhandler_pipe *) build_fh_dev (*pipew_dev)) == NULL) { delete fhs[0]; + CloseHandle (r); CloseHandle (w); } else