Ecore con: Close server socket fd on failure.
authorAwadhesh Singh <awadhesh1.s@samsung.com>
Fri, 5 Feb 2016 11:44:39 +0000 (11:44 +0000)
committerTom Hacohen <tom@stosb.com>
Fri, 5 Feb 2016 11:44:41 +0000 (11:44 +0000)
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

src/lib/ecore_con/ecore_con_local.c

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