summaryrefslogtreecommitdiffstats
path: root/lib/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/log.c')
-rw-r--r--lib/log.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/log.c b/lib/log.c
index 28a04dc9..0c76fe95 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -971,6 +971,8 @@ closezlog (struct zlog *zl)
{
assert((zl == zlog_list) && (zl->next == NULL)) ; /* pro tem */
+ LOG_LOCK() ;
+
closelog();
if (zl->file_fd >= 0)
close (zl->file_fd) ;
@@ -985,10 +987,9 @@ closezlog (struct zlog *zl)
uzlog_set_effective_level(zl) ;
- if (zl->filename != NULL)
- free (zl->filename);
-
XFREE (MTYPE_ZLOG, zl);
+
+ LOG_UNLOCK() ;
}
/*------------------------------------------------------------------------------