From: Tom Goff Date: Wed, 10 Nov 2010 21:01:17 +0000 (-0800) Subject: lib: zlog should clean up its memory X-Git-Tag: frr-2.0-rc1~1918^2~153 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=cd3355b83202bc109045ba1e90b6725610aa256d;p=mirror%2Ffrr.git lib: zlog should clean up its memory * log.c: (closezlog) Also free the dynamically allocated filename when a log is closed. --- diff --git a/lib/log.c b/lib/log.c index 0c2f655bc0..df6e13db41 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); }