[systemd-devel] [PATCH] Fix file descriptor leak in test_capability()
Thomas Jarosch
thomas.jarosch at intra2net.com
Wed Oct 26 00:38:39 PDT 2011
Detected by cppcheck.
Signed-off-by: Thomas Jarosch <thomas.jarosch at intra2net.com>
---
src/condition.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
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));
}
--
1.7.4.4
More information about the systemd-devel
mailing list