Fix leaking file handle for log messages when something fails.

This commit is contained in:
Wilco Baan Hofman 2016-11-28 17:37:07 +01:00
parent 8e5aa64b37
commit e8a135d127

View file

@ -50,6 +50,7 @@ STATUS debug(int loglevel, const char *location, const char *function, ...)
fprintf(stderr, "%s", text);
}
fprintf(logfile, "%s", text);
fclose(logfile);
return ST_GENERAL_FAILURE;
}