summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Jarosch <thomas.jarosch@intra2net.com>2011-10-26 09:38:39 +0200
committerLennart Poettering <lennart@poettering.net>2011-11-01 17:02:32 +0100
commit7670e5a2aab543bc6b442ab0683411770e06fe26 (patch)
tree8b469081adad8290a6439558348de61682a02c0a
parent7c2ec00930ce1f4aabfbb405d84b67eb9d065ef0 (diff)
condition: Fix file descriptor leak in test_capability()
Detected by cppcheck.
-rw-r--r--src/condition.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/condition.c b/src/condition.c
index f18c45421a..2b51a16f17 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));
}