diff options
Diffstat (limited to 'winsup/cygwin/thread.cc')
-rw-r--r-- | winsup/cygwin/thread.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index fc2570c..eeaa4ba 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -1676,8 +1676,9 @@ semaphore::semaphore (const char *sem_name, int oflag, mode_t mode, if (oflag & O_CREAT) { SECURITY_ATTRIBUTES sa = sec_all; + security_descriptor sd; if (allow_ntsec) - set_security_attribute (mode, &sa, alloca (4096), 4096); + set_security_attribute (mode, &sa, sd); this->win32_obj_id = ::CreateSemaphore (&sa, value, LONG_MAX, sem_name); if (!this->win32_obj_id) magic = 0; |