* select.cc (pipe_cleanup): Make sure that device_specific_pipe is always
deleted regardless of whether it has a unique thread associated with it.
This commit is contained in:
parent
46ac7c5a4f
commit
693581e4a4
|
@ -1,3 +1,9 @@
|
|||
2011-04-19 Peter Rosin <peda@lysator.liu.se>
|
||||
|
||||
* select.cc (pipe_cleanup): Make sure that device_specific_pipe is
|
||||
always deleted regardless of whether it has a unique thread associated
|
||||
with it.
|
||||
|
||||
2011-04-02 Jon TURNEY <jon.turney@dronecode.org.uk>
|
||||
|
||||
* thread.cc (semaphore::init): We cannot reliably infer anything from
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
|
|
Loading…
Reference in New Issue