Browse Source

lib: zlog should clean up its memory

* log.c: (closezlog) Also free the dynamically allocated filename when
    a log is closed.
Tom Goff 9 years ago
parent
commit
7e69d99367
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lib/log.c

+ 3 - 0
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);
 }