summaryrefslogtreecommitdiff
path: root/lib/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/log.c b/lib/log.c
index 8c3e2ddc..0c2f655b 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -649,7 +649,9 @@ void
closezlog (struct zlog *zl)
{
closelog();
- fclose (zl->fp);
+
+ if (zl->fp != NULL)
+ fclose (zl->fp);
XFREE (MTYPE_ZLOG, zl);
}