sd-resolve: use close_many() (#3643)
author0xAX <0xAX@users.noreply.github.com>
Sat, 2 Jul 2016 15:17:26 +0000 (18:17 +0300)
committerLennart Poettering <lennart@poettering.net>
Sat, 2 Jul 2016 15:17:26 +0000 (08:17 -0700)
src/libsystemd/sd-resolve/sd-resolve.c

index d8303e2..60aa55d 100644 (file)
@@ -585,9 +585,7 @@ static void resolve_free(sd_resolve *resolve) {
                 (void) pthread_join(resolve->workers[i], NULL);
 
         /* Close all communication channels */
-        for (i = 0; i < _FD_MAX; i++)
-                safe_close(resolve->fds[i]);
-
+        close_many(resolve->fds, _FD_MAX);
         free(resolve);
 }