Do not leak log file descriptor.

This commit is contained in:
nicm 2015-09-24 12:03:58 +00:00
parent ddb2d1221b
commit 69ea6b9373

3
log.c
View File

@ -42,6 +42,9 @@ log_event_cb(unused int severity, const char *msg)
void
log_open(const char *path)
{
if (log_file != NULL)
fclose(log_file);
log_file = fopen(path, "w");
if (log_file == NULL)
return;