Fix file descriptor leak
Credit goes to "cppcheck". Signed-off-by: Thomas Jarosch <[email protected]>
This commit is contained in:
committed by
Martin Willi
parent
f50ee82573
commit
88d180c7d8
@@ -240,6 +240,7 @@ static segment_mask_t get_active(private_ha_kernel_t *this, char *file)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
len = read(fd, buf, sizeof(buf)-1);
|
len = read(fd, buf, sizeof(buf)-1);
|
||||||
|
close(fd);
|
||||||
if (len == -1)
|
if (len == -1)
|
||||||
{
|
{
|
||||||
DBG1(DBG_CFG, "reading from CLUSTERIP file '%s' failed: %s",
|
DBG1(DBG_CFG, "reading from CLUSTERIP file '%s' failed: %s",
|
||||||
|
|||||||
Reference in New Issue
Block a user