]> git.puffer.fish Git - mirror/frr.git/commitdiff
lib: zlog should clean up its memory
authorTom Goff <thomas.goff@boeing.com>
Wed, 10 Nov 2010 21:01:17 +0000 (13:01 -0800)
committerPaul Jakma <paul@quagga.net>
Mon, 21 Mar 2011 13:30:54 +0000 (13:30 +0000)
* log.c: (closezlog) Also free the dynamically allocated filename when
    a log is closed.

lib/log.c

index 0c2f655bc0ed11b7773a863c07873bb4c10824cb..df6e13db41603ea60a7bca1f00fde0ad94934fae 100644 (file)
--- 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);
 }