summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Goff <thomas.goff@boeing.com>2010-11-10 13:01:17 -0800
committerPaul Jakma <paul@quagga.net>2011-03-21 13:30:54 +0000
commit7e69d993673597334b1e1b3d1072a4c064f293d5 (patch)
treecf0362e38edca6f487aa638cc67c3c994a4cfcf1
parent4bd045d5dd28653af899c01d6f0c413d74677114 (diff)
lib: zlog should clean up its memory
* log.c: (closezlog) Also free the dynamically allocated filename when a log is closed.
-rw-r--r--lib/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/log.c b/lib/log.c
index 0c2f655b..df6e13db 100644
--- a/lib/log.c
+++ b/lib/log.c
@@ -653,6 +653,9 @@ closezlog (struct zlog *zl)
if (zl->fp != NULL)
fclose (zl->fp);
+ if (zl->filename != NULL)
+ free (zl->filename);
+
XFREE (MTYPE_ZLOG, zl);
}