diff options
author | Philippe De Swert <philippedeswert@gmail.com> | 2014-09-10 22:14:41 +0300 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-09-11 17:47:37 +0200 |
commit | aa44499da15a8fa7026463555a7a27e55e4e24a8 (patch) | |
tree | fdae6b7109ad8b46a7b23ebf59d96547aa81162e /src/activate | |
parent | 3f2e132a197ba3f5172cbbcd285e9aab021de8fc (diff) | |
download | systemd-aa44499da15a8fa7026463555a7a27e55e4e24a8.tar.gz systemd-aa44499da15a8fa7026463555a7a27e55e4e24a8.tar.bz2 systemd-aa44499da15a8fa7026463555a7a27e55e4e24a8.zip |
activate: fix fd leak in do_accept()
Found with Coverity.
Diffstat (limited to 'src/activate')
-rw-r--r-- | src/activate/activate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/activate/activate.c b/src/activate/activate.c index 8942773866..0a1df37f35 100644 --- a/src/activate/activate.c +++ b/src/activate/activate.c @@ -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) { |