From f3c01a9a6c157230d03156b221d690e003284e70 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 10 Aug 2019 23:17:39 +0100 Subject: [PATCH] efl thread - use pipe array names consistently to avoid err handling bug in the case pipes fail to create we'll close the wrong ones... this fixes that. it also happens because i didn't use names consistently. now it does so it's easier to keep right. thanks coverity. fix CID 1396994 --- src/lib/ecore/efl_thread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore/efl_thread.c b/src/lib/ecore/efl_thread.c index 9ae137ae31..a5bb07caef 100644 --- a/src/lib/ecore/efl_thread.c +++ b/src/lib/ecore/efl_thread.c @@ -648,7 +648,7 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) // input/output pipes if (td->flags & EFL_TASK_FLAGS_USE_STDIN) { - if (pipe(pipe_to_thread) != 0) + if (pipe(pipe_from_thread) != 0) { ERR("Can't create to_thread pipe"); free(thdat); @@ -657,13 +657,13 @@ _efl_thread_efl_task_run(Eo *obj, Efl_Thread_Data *pd) } if (td->flags & EFL_TASK_FLAGS_USE_STDOUT) { - if (pipe(pipe_from_thread) != 0) + if (pipe(pipe_to_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]); + close(pipe_from_thread[0]); + close(pipe_from_thread[1]); } free(thdat); return NULL;