diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-25 14:22:43 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-25 14:22:43 +0100 |
commit | 7c8871d31510865e40c8628ef765996202a3cc00 (patch) | |
tree | 622b7aa085999fe3d2908772ff0d0c6ec5bf4400 /src/core/socket.c | |
parent | 7c257428969aaba2acc4e26753c86d6f4774354a (diff) | |
parent | f00022dd121c73b543ae667ddce9814bd67a1b73 (diff) |
Merge pull request #1654 from poettering/util-lib
Various changes to src/basic/
Diffstat (limited to 'src/core/socket.c')
-rw-r--r-- | src/core/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index e42ed62ef1..e2085dac1c 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -37,6 +37,7 @@ #include "dbus-socket.h" #include "def.h" #include "exit-status.h" +#include "fd-util.h" #include "formats-util.h" #include "label.h" #include "log.h" @@ -48,6 +49,7 @@ #include "smack-util.h" #include "socket.h" #include "special.h" +#include "string-util.h" #include "strv.h" #include "unit-name.h" #include "unit-printf.h" @@ -107,11 +109,9 @@ static void socket_unwatch_control_pid(Socket *s) { } static void socket_cleanup_fd_list(SocketPort *p) { - int k = p->n_auxiliary_fds; - - while (k--) - safe_close(p->auxiliary_fds[k]); + assert(p); + close_many(p->auxiliary_fds, p->n_auxiliary_fds); p->auxiliary_fds = mfree(p->auxiliary_fds); p->n_auxiliary_fds = 0; } |