summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Goff <thomas.goff@boeing.com>2010-11-10 13:01:17 -0800
committerDenis Ovsienko <infrastation@yandex.ru>2011-08-01 15:39:26 +0400
commitcd3355b83202bc109045ba1e90b6725610aa256d (patch)
tree66d0dc78f55508bbf7b5a6603e91ff8f03260ab9
parentf4ac0fee73100c6268365df31096a64443bfb93b (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);
}