On 15-09-2012 01:47, Eitan Adler wrote:
> Author: eadler
> Date: Fri Sep 14 23:47:23 2012
> New Revision: 240527
> URL: http://svn.freebsd.org/changeset/base/240527
> 
> Log:
>   Free memory before exiting in order to
>   help tools understand that we're not leaking it.
>   
>   PR:         bin/171634
>   Submitted by:       Erik Cederstrand <e...@cederstrand.dk>
>   Approved by:        cperciva
>   MFC after:  3 days
> 
> Modified:
>   head/bin/df/df.c
> 
> Modified: head/bin/df/df.c
> ==============================================================================
> --- head/bin/df/df.c  Fri Sep 14 22:53:47 2012        (r240526)
> +++ head/bin/df/df.c  Fri Sep 14 23:47:23 2012        (r240527)
> @@ -290,6 +290,7 @@ main(int argc, char *argv[])
>                       prtstat(&mntbuf[i], &maxwidths);
>       if (cflag)
>               prtstat(&totalbuf, &maxwidths);
> +     free(mntbuf);
>       return (rv);
>  }

Freeing memory right before exiting is a waste of time. The tool
shouldn't complain about it.

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to