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
c2a33f2225
commit
60f549c5fb
|
@ -660,8 +660,11 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd)
|
|||
if (pipe(pipe_from_thread) != 0)
|
||||
{
|
||||
ERR("Can't create from_thread pipe");
|
||||
if (td->flags & EFL_TASK_FLAGS_USE_STDIN)
|
||||
{
|
||||
close(pipe_to_thread[0]);
|
||||
close(pipe_to_thread[1]);
|
||||
}
|
||||
free(thdat);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue