chiark
/
gitweb
/
~ianmdlvl
/
elogind.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 f18c45421a08bf935f542ebad22312ae58a92c45..2b51a16f17548e48500a460e533e4dee1de1b1b9 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));
}
return !!(capabilities & (1ULL << value));
}