summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2013-07-19 11:54:51 +0000
committerCorinna Vinschen <corinna@vinschen.de>2013-07-19 11:54:51 +0000
commit78cefca9fc35492d90533abbbe6e37313610fe17 (patch)
treed1bcd657cfeeff7a741002c2ecc353374b5b1148
parent000235c38dbd80986aa999c5c112af34977a123e (diff)
downloadcygnal-78cefca9fc35492d90533abbbe6e37313610fe17.tar.gz
cygnal-78cefca9fc35492d90533abbbe6e37313610fe17.tar.bz2
cygnal-78cefca9fc35492d90533abbbe6e37313610fe17.zip
* cygtls.cc (_cygtls::remove): Close cw_timer handle, thus avoiding
handle leak.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/cygtls.cc7
2 files changed, 10 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 2ded7a67e..0b3e91362 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2013-07-19 Corinna Vinschen <corinna@vinschen.de>
+
+ * cygtls.cc (_cygtls::remove): Close cw_timer handle, thus avoiding
+ handle leak.
+
2013-07-19 Jon TURNEY <jon.turney@dronecode.org.uk>
* cygserver_ipc.h (ipc_retval::ipc_retval): Take ssize_t as argument
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index 6aebdc975..9d49d92bf 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -1,7 +1,7 @@
/* cygtls.cc
- Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Red
- Hat, Inc.
+ Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
+ 2013 Red Hat, Inc.
This software is a copyrighted work licensed under the terms of the
Cygwin license. Please consult the file "CYGWIN_LICENSE" for
@@ -193,6 +193,9 @@ _cygtls::remove (DWORD wait)
free_local (hostent_buf);
/* Free temporary TLS path buffers. */
locals.pathbufs.destroy ();
+ /* Close timer handle. */
+ if (locals.cw_timer)
+ NtClose (locals.cw_timer);
cygheap->remove_tls (this, wait);
remove_wq (wait);
}