jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=868d0fb2e8a8392f3e5593ac1e24bc840affb3d2

commit 868d0fb2e8a8392f3e5593ac1e24bc840affb3d2
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Fri Jul 31 16:58:19 2015 +0900

    ecore_pipe: Fix potential double close
    
    p->fd_read can be closed in _ecore_pipe_read (from a previous loop)
    
    CID 1267459
---
 src/lib/ecore/ecore_pipe.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_pipe.c b/src/lib/ecore/ecore_pipe.c
index 823f07d..35f921f 100644
--- a/src/lib/ecore/ecore_pipe.c
+++ b/src/lib/ecore/ecore_pipe.c
@@ -487,8 +487,11 @@ _ecore_pipe_wait(Ecore_Pipe *p,
           }
         else if (errno != EINTR)
           {
-             close(p->fd_read);
-             p->fd_read = PIPE_FD_INVALID;
+             if (p->fd_read != PIPE_FD_INVALID)
+               {
+                  close(p->fd_read);
+                  p->fd_read = PIPE_FD_INVALID;
+               }
              break;
           }
 

-- 


Reply via email to