ecore pipe - fix close of pipe that doesnt set fd to invalid

this should fix CID 1267459
This commit is contained in:
Carsten Haitzler 2016-07-11 22:02:45 +09:00
parent 679af3271f
commit 2d003e2503
1 changed files with 3 additions and 0 deletions

View File

@ -389,6 +389,9 @@ _ecore_pipe_del(Ecore_Pipe *p)
if (p->fd_handler) _ecore_main_fd_handler_del(p->fd_handler);
if (p->fd_read != PIPE_FD_INVALID) pipe_close(p->fd_read);
if (p->fd_write != PIPE_FD_INVALID) pipe_close(p->fd_write);
p->fd_handler = NULL;
p->fd_read = PIPE_FD_INVALID;
p->fd_write = PIPE_FD_INVALID;
data = (void *)p->data;
ecore_pipe_mp_free(p);
return data;