]> err.no Git - systemd/commitdiff
condition: Fix file descriptor leak in test_capability()
authorThomas Jarosch <thomas.jarosch@intra2net.com>
Wed, 26 Oct 2011 07:38:39 +0000 (09:38 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 1 Nov 2011 16:02:32 +0000 (17:02 +0100)
Detected by cppcheck.

src/condition.c

index f18c45421a08bf935f542ebad22312ae58a92c45..2b51a16f17548e48500a460e533e4dee1de1b1b9 100644 (file)
@@ -187,6 +187,8 @@ static bool test_capability(const char *parameter) {
                 }
         }
 
+        fclose(f);
+
         return !!(capabilities & (1ULL << value));
 }