forked from enlightenment/efl
efl thread - fic pipe close to not close invalid pipe fds
if we only have stdout and no stdin we'd accidentally close junk int's on the stack. fix this fix CID 1396963
This commit is contained in:
parent
4fb161ee1a
commit
d0d883b1c9
|
@ -604,8 +604,11 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
|
||||||
if (pipe(pipe_from_thread) != 0)
|
if (pipe(pipe_from_thread) != 0)
|
||||||
{
|
{
|
||||||
ERR("Can't create from_thread pipe");
|
ERR("Can't create from_thread pipe");
|
||||||
close(pipe_to_thread[0]);
|
if (td->flags & EFL_TASK_FLAGS_USE_STDIN)
|
||||||
close(pipe_to_thread[1]);
|
{
|
||||||
|
close(pipe_to_thread[0]);
|
||||||
|
close(pipe_to_thread[1]);
|
||||||
|
}
|
||||||
free(thdat);
|
free(thdat);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue