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 70de06b20b55adb47270381455f94812ae196f19..ed51ec8a7f8dd8fc719045625b701f12a212e6d1 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;