diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-06-23 19:05:15 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-06-23 19:05:15 +0000 |
commit | 8431e478d2f74ebf0bcfd2bc4c71e3c391fc7753 (patch) | |
tree | d3de9519039b3fb0e2536eabbabd2445015e902b /winsup/cygwin/thread.cc | |
parent | cf06a0b18cf8dd93531f73e2a31f0c72389e84ec (diff) | |
download | cygnal-8431e478d2f74ebf0bcfd2bc4c71e3c391fc7753.tar.gz cygnal-8431e478d2f74ebf0bcfd2bc4c71e3c391fc7753.tar.bz2 cygnal-8431e478d2f74ebf0bcfd2bc4c71e3c391fc7753.zip |
* spawn.cc (find_exec): Initialize err (CID 60111).
* strace.cc (strace::activate): Fix potential buffer overrun (CID 59938)
* syscalls.cc (popen): Close parent pipe descriptor via fclosing fp on
error to avoid resource leak (CID 59981).
* thread.cc (pthread::exit): Avoid accessing cygtls member after
deleting "this" (CID 60217).
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 8cec7fba2..e411301cb 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -511,6 +511,7 @@ void pthread::exit (void *value_ptr) { class pthread *thread = this; + bool is_main_tls = (cygtls == _main_tls); // Check cygtls before deleting this // run cleanup handlers pop_all_cleanup_handlers (); @@ -536,7 +537,7 @@ pthread::exit (void *value_ptr) ::exit (0); else { - if (cygtls == _main_tls) + if (is_main_tls) { _cygtls *dummy = (_cygtls *) malloc (sizeof (_cygtls)); *dummy = *_main_tls; |