]> 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)
committerDenis Ovsienko <infrastation@yandex.ru>
Mon, 1 Aug 2011 11:39:26 +0000 (15:39 +0400)
* 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);
 }