[systemd-commits] src/condition.c

Lennart Poettering lennart at kemper.freedesktop.org
Tue Nov 1 09:03:24 PDT 2011


 src/condition.c |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7670e5a2aab543bc6b442ab0683411770e06fe26
Author: Thomas Jarosch <thomas.jarosch at intra2net.com>
Date:   Wed Oct 26 09:38:39 2011 +0200

    condition: Fix file descriptor leak in test_capability()
    
    Detected by cppcheck.

diff --git a/src/condition.c b/src/condition.c
index f18c454..2b51a16 100644
--- a/src/condition.c
+++ b/src/condition.c
@@ -187,6 +187,8 @@ static bool test_capability(const char *parameter) {
                 }
         }
 
+        fclose(f);
+
         return !!(capabilities & (1ULL << value));
 }
 



More information about the systemd-commits mailing list