diff options
author | Christopher Faylor <me@cgf.cx> | 2011-04-20 05:10:54 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-04-20 05:10:54 +0400 |
commit | 693581e4a48b3f18c4cf648b809d4e21a0ae1b84 (patch) | |
tree | 58bc88b21f5c87825013a740c0df3b55d624265d /winsup/cygwin/select.cc | |
parent | 46ac7c5a4ffc2b02c67f4b550fec43bac3e5819a (diff) |
* select.cc (pipe_cleanup): Make sure that device_specific_pipe is always
deleted regardless of whether it has a unique thread associated with it.
Diffstat (limited to 'winsup/cygwin/select.cc')
-rw-r--r-- | winsup/cygwin/select.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 4389b8e66..e63567700 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -644,13 +644,15 @@ static void pipe_cleanup (select_record *, select_stuff *stuff) { select_pipe_info *pi = (select_pipe_info *) stuff->device_specific_pipe; - if (pi && pi->thread) + if (!pi) + return; + if (pi->thread) { pi->stop_thread = true; pi->thread->detach (); - delete pi; - stuff->device_specific_pipe = NULL; } + delete pi; + stuff->device_specific_pipe = NULL; } int |