[quagga-dev 8343] [PATCH 2/7] lib: Memory cleanup

Tom Goff thomas.goff at boeing.com
Wed Nov 10 21:01:17 GMT 2010


* log.c: (closezlog) Also free the dynamically allocated filename when
    a log is closed.

Signed-off-by: Tom Goff <thomas.goff at boeing.com>
---
 lib/log.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/lib/log.c b/lib/log.c
index 0c2f655..df6e13d 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);
 }
 
-- 
1.7.0.4




More information about the Quagga-dev mailing list