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:
authorChristopher Faylor <me@cgf.cx>2006-08-11 00:25:54 +0400
committerChristopher Faylor <me@cgf.cx>2006-08-11 00:25:54 +0400
commit1767b8d02834dfbd10c2857f1035c22148856d75 (patch)
tree3a481e3694a7d36e2d6347d32f82e3028cacc75a /winsup/cygwin/pinfo.cc
parent2f98d8bdc7a9615d7d473cd808e7482c62bd9e41 (diff)
* pinfo.cc (_onreturn::~onreturn): Don't attempt to close a NULL handle.
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 9440943d8..d73ad20aa 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -1097,10 +1097,11 @@ class _onreturn
public:
~_onreturn ()
{
- if (h)
+ if (h && *h)
{
CloseHandle (*h);
*h = NULL;
+ h = NULL;
}
}
void no_close_p_handle () {h = NULL;}