summaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'log.c')
-rw-r--r--log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/log.c b/log.c
index 8c2fdb07..711b9b8a 100644
--- a/log.c
+++ b/log.c
@@ -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;