Blob Blame History Raw
From 62f4ee1b584845c8a3d4caf41c572ec5e7d7af66 Mon Sep 17 00:00:00 2001
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date: Wed, 26 Oct 2011 09:38:39 +0200
Subject: [PATCH] condition: Fix file descriptor leak in test_capability()

Detected by cppcheck.
(cherry picked from commit 7670e5a2aab543bc6b442ab0683411770e06fe26)
---
 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.7.5