summaryrefslogtreecommitdiff
path: root/src/log.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/log.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/log.c b/src/log.c
index c799ff0..c983162 100644
--- a/src/log.c
+++ b/src/log.c
@@ -78,7 +78,12 @@ int open_log_file (const char *log_file_name)
*/
void close_log_file (void)
{
+ if (log_file_fd < 0) {
+ return;
+ }
+
close (log_file_fd);
+ log_file_fd = -1;
}
/*