diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2005-02-02 13:09:51 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2005-02-02 13:09:51 +0300 |
commit | 0763734fd96d7d592c2f438f133474c5a2658995 (patch) | |
tree | bb4ab8988965f75e4cf0895f0b00feb20f9aec8b /winsup/cygwin/pipe.cc | |
parent | 29ce22c955f7a2cee33e9c465e4e7e0d043671bc (diff) |
* pipe.cc (fhandler_pipe::dup): Fix conditionals in case of error.
Diffstat (limited to 'winsup/cygwin/pipe.cc')
-rw-r--r-- | winsup/cygwin/pipe.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/winsup/cygwin/pipe.cc b/winsup/cygwin/pipe.cc index 7dbd87a5f..498b17206 100644 --- a/winsup/cygwin/pipe.cc +++ b/winsup/cygwin/pipe.cc @@ -1,6 +1,7 @@ /* pipe.cc: pipe for Cygwin. - Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. + Copyright 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + 2005 Red Hat, Inc. This file is part of Cygwin. @@ -240,11 +241,11 @@ fhandler_pipe::dup (fhandler_base *child) goto out; err: - if (!ftp->guard) + if (ftp->guard) CloseHandle (ftp->guard); - if (!ftp->writepipe_exists) + if (ftp->writepipe_exists) CloseHandle (ftp->writepipe_exists); - if (!ftp->read_state) + if (ftp->read_state) CloseHandle (ftp->read_state); goto leave; |