From 7670e5a2aab543bc6b442ab0683411770e06fe26 Mon Sep 17 00:00:00 2001 From: Thomas Jarosch Date: Wed, 26 Oct 2011 09:38:39 +0200 Subject: [PATCH] condition: Fix file descriptor leak in test_capability() Detected by cppcheck. --- src/condition.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/condition.c b/src/condition.c index f18c4542..2b51a16f 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)); } -- 2.39.5