strongswan.org
Wiki/Project Management
Downloads
Gitweb
projects
/
strongswan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f50ee82
)
Fix file descriptor leak
author
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Fri, 26 Aug 2011 18:57:10 +0000
(20:57 +0200)
committer
Martin Willi
<martin@revosec.ch>
Mon, 29 Aug 2011 07:10:28 +0000
(09:10 +0200)
Credit goes to "cppcheck".
Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
src/libcharon/plugins/ha/ha_kernel.c
patch
|
blob
|
history
diff --git
a/src/libcharon/plugins/ha/ha_kernel.c
b/src/libcharon/plugins/ha/ha_kernel.c
index
1d619b2
..
07a2015
100644
(file)
--- a/
src/libcharon/plugins/ha/ha_kernel.c
+++ b/
src/libcharon/plugins/ha/ha_kernel.c
@@
-240,6
+240,7
@@
static segment_mask_t get_active(private_ha_kernel_t *this, char *file)
return 0;
}
len = read(fd, buf, sizeof(buf)-1);
return 0;
}
len = read(fd, buf, sizeof(buf)-1);
+ close(fd);
if (len == -1)
{
DBG1(DBG_CFG, "reading from CLUSTERIP file '%s' failed: %s",
if (len == -1)
{
DBG1(DBG_CFG, "reading from CLUSTERIP file '%s' failed: %s",