From cd3355b83202bc109045ba1e90b6725610aa256d Mon Sep 17 00:00:00 2001 From: Tom Goff Date: Wed, 10 Nov 2010 13:01:17 -0800 Subject: lib: zlog should clean up its memory * log.c: (closezlog) Also free the dynamically allocated filename when a log is closed. --- lib/log.c | 3 +++ 1 file changed, 3 insertions(+) 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); } -- cgit v1.2.1