raster pushed a commit to branch efl-1.22.

http://git.enlightenment.org/core/efl.git/commit/?id=64b18d515245ed91be63bb8ea31d6233a2a01ffd

commit 64b18d515245ed91be63bb8ea31d6233a2a01ffd
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Sat Aug 10 23:17:39 2019 +0100

    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 63695e58d7..2abadf04e8 100644
--- a/src/lib/ecore/efl_thread.c
+++ b/src/lib/ecore/efl_thread.c
@@ -592,7 +592,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);
@@ -601,13 +601,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;

-- 


Reply via email to