daemon: fix file descriptor leaks

This commit is contained in:
Matthias Gerstner
2019-04-03 16:27:12 +02:00
parent 618997f0b3
commit d7394cbeb2
4 changed files with 23 additions and 10 deletions

View File

@@ -133,6 +133,7 @@ const char *get_gov_state(void)
/* Don't handle the mixed case, this shouldn't ever happen
* But it is a clear sign we shouldn't carry on */
LOG_ERROR("Governors malformed: got \"%s\", expected \"%s\"", contents, governor);
fclose(f);
return "malformed";
}