summaryrefslogtreecommitdiffstats
path: root/winsup/cygserver/bsd_helper.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygserver/bsd_helper.cc')
-rw-r--r--winsup/cygserver/bsd_helper.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygserver/bsd_helper.cc b/winsup/cygserver/bsd_helper.cc
index 364dddd7f..9fb3c9bfa 100644
--- a/winsup/cygserver/bsd_helper.cc
+++ b/winsup/cygserver/bsd_helper.cc
@@ -1,6 +1,6 @@
/* bsd_helper.cc
- Copyright 2003, 2004 Red Hat Inc.
+ Copyright 2003, 2004, 2005 Red Hat Inc.
This file is part of Cygwin.
@@ -129,7 +129,7 @@ ipcexit_hookthread (const LPVOID param)
exiting process and shmexit_myhook to keep track of shared
memory. */
if (Giant.owner == shs->ipcblk.winpid)
- mtx_unlock (&Giant);
+ mtx_unlock (&Giant);
if (support_semaphores == TUN_TRUE)
semexit_myhook (NULL, &shs->ipcblk);
if (support_sharedmem == TUN_TRUE)
@@ -152,6 +152,7 @@ ipcexit_hookthread (const LPVOID param)
if (ipcht_entry->winpid == shs->ipcblk.winpid)
{
SLIST_REMOVE (&ipcht_list, ipcht_entry, ipc_hookthread, sht_next);
+ CloseHandle (ipcht_entry->thread);
delete ipcht_entry;
}
}