forked from enlightenment/efl
ecore_pipe: Fix potential double close
p->fd_read can be closed in _ecore_pipe_read (from a previous loop) CID 1267459
This commit is contained in:
parent
7bfecbdaf2
commit
868d0fb2e8
|
@ -487,8 +487,11 @@ _ecore_pipe_wait(Ecore_Pipe *p,
|
||||||
}
|
}
|
||||||
else if (errno != EINTR)
|
else if (errno != EINTR)
|
||||||
{
|
{
|
||||||
close(p->fd_read);
|
if (p->fd_read != PIPE_FD_INVALID)
|
||||||
p->fd_read = PIPE_FD_INVALID;
|
{
|
||||||
|
close(p->fd_read);
|
||||||
|
p->fd_read = PIPE_FD_INVALID;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue