Blame 0008-condition-Fix-file-descriptor-leak-in-test_capabilit.patch
|
Michal Schmidt |
e43452 |
From 62f4ee1b584845c8a3d4caf41c572ec5e7d7af66 Mon Sep 17 00:00:00 2001
|
|
Michal Schmidt |
e43452 |
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
|
|
Michal Schmidt |
e43452 |
Date: Wed, 26 Oct 2011 09:38:39 +0200
|
|
Michal Schmidt |
f1996e |
Subject: [PATCH] condition: Fix file descriptor leak in test_capability()
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
Detected by cppcheck.
|
|
Michal Schmidt |
e43452 |
(cherry picked from commit 7670e5a2aab543bc6b442ab0683411770e06fe26)
|
|
Michal Schmidt |
e43452 |
---
|
|
Michal Schmidt |
e43452 |
src/condition.c | 2 ++
|
|
Michal Schmidt |
e43452 |
1 files changed, 2 insertions(+), 0 deletions(-)
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
diff --git a/src/condition.c b/src/condition.c
|
|
Michal Schmidt |
e43452 |
index f18c454..2b51a16 100644
|
|
Michal Schmidt |
e43452 |
--- a/src/condition.c
|
|
Michal Schmidt |
e43452 |
+++ b/src/condition.c
|
|
Michal Schmidt |
e43452 |
@@ -187,6 +187,8 @@ static bool test_capability(const char *parameter) {
|
|
Michal Schmidt |
e43452 |
}
|
|
Michal Schmidt |
e43452 |
}
|
|
Michal Schmidt |
e43452 |
|
|
Michal Schmidt |
e43452 |
+ fclose(f);
|
|
Michal Schmidt |
e43452 |
+
|
|
Michal Schmidt |
e43452 |
return !!(capabilities & (1ULL << value));
|
|
Michal Schmidt |
e43452 |
}
|
|
Michal Schmidt |
e43452 |
|