diff options
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; } |