activate: fix fd leak in do_accept()

Found with Coverity.
This commit is contained in:
Philippe De Swert
2014-09-10 22:14:41 +03:00
committed by David Herrmann
parent 3f2e132a19
commit aa44499da1

View File

@@ -242,7 +242,7 @@ static int launch1(const char* child, char** argv, char **env, int fd) {
static int do_accept(const char* name, char **argv, char **envp, int fd) {
_cleanup_free_ char *local = NULL, *peer = NULL;
int fd2;
_cleanup_close_ int fd2 = -1;
fd2 = accept(fd, NULL, NULL);
if (fd2 < 0) {