Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/libc/bsdlib.cc')
-rw-r--r--winsup/cygwin/libc/bsdlib.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/winsup/cygwin/libc/bsdlib.cc b/winsup/cygwin/libc/bsdlib.cc
index 66cffc7d3..696a9f856 100644
--- a/winsup/cygwin/libc/bsdlib.cc
+++ b/winsup/cygwin/libc/bsdlib.cc
@@ -150,6 +150,8 @@ forkpty (int *amaster, char *name, const struct termios *termp,
switch (pid = fork ())
{
case -1:
+ close (master);
+ close (slave);
return -1;
case 0:
close (master);