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

Balaji G balajig81 at gmail.com
Tue Nov 16 05:43:08 GMT 2010


Applied, Thanks

On Thu, Nov 11, 2010 at 2:31 AM, Tom Goff <thomas.goff at boeing.com> wrote:

> * 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
>
> _______________________________________________
> Quagga-dev mailing list
> Quagga-dev at lists.quagga.net
> http://lists.quagga.net/mailman/listinfo/quagga-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quagga.net/pipermail/quagga-dev/attachments/20101116/c5b064ea/attachment-0001.html>


More information about the Quagga-dev mailing list