projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c2ec00
)
condition: Fix file descriptor leak in test_capability()
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Wed, 26 Oct 2011 07:38:39 +0000
(09:38 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 1 Nov 2011 16:02:32 +0000
(17:02 +0100)
Detected by cppcheck.
src/condition.c
patch
|
blob
|
history
diff --git
a/src/condition.c
b/src/condition.c
index
f18c454
..
2b51a16
100644
(file)
--- 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));
}