chiark / gitweb /
tmpfiles: plug file descriptor leak.
authorDave Reisner <dreisner@archlinux.org>
Wed, 12 Sep 2012 20:21:00 +0000 (16:21 -0400)
committerLennart Poettering <lennart@poettering.net>
Wed, 12 Sep 2012 22:10:35 +0000 (00:10 +0200)
Introduced in d4e9eb91.

src/tmpfiles/tmpfiles.c

index 70de06b..ed51ec8 100644 (file)
@@ -528,6 +528,8 @@ static int write_one_file(Item *i, const char *path) {
                 }
         }
 
+        close_nointr_nofail(fd);
+
         if (stat(path, &st) < 0) {
                 log_error("stat(%s) failed: %m", path);
                 return -errno;