Ecore con: Close server socket fd on failure.

Summary:
Socket fd must be closed to avoid file discripter leak.
Programs can usually only open a limited number of file descriptors,
so if this happens a lot, it may turn into a problem.

@fix

Reviewers: raster, Hermet, wonsik, spacegrapher, cedric, jpeg, tasn

Reviewed By: tasn

Subscribers: cedric, alok25, yashu21985, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D3660
This commit is contained in:
Awadhesh Singh 2016-02-05 11:44:39 +00:00 committed by Tom Hacohen
parent f04d509feb
commit f05577c3ae
1 changed files with 1 additions and 0 deletions

View File

@ -418,6 +418,7 @@ fd_ready:
error_umask:
umask(pmode);
error:
close(svr->fd);
#endif /* HAVE_LOCAL_SOCKETS */
return 0;
}