diff options
author | Thomas Jarosch <thomas.jarosch@intra2net.com> | 2011-10-26 09:38:39 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-11-01 17:02:32 +0100 |
commit | 7670e5a2aab543bc6b442ab0683411770e06fe26 (patch) | |
tree | 8b469081adad8290a6439558348de61682a02c0a | |
parent | 7c2ec00930ce1f4aabfbb405d84b67eb9d065ef0 (diff) |
condition: Fix file descriptor leak in test_capability()
Detected by cppcheck.
-rw-r--r-- | src/condition.c | 2 |
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)); } |