svn commit: r240527 - head/bin/df

Tijl Coosemans tijl at coosemans.org
Sat Sep 15 20:59:06 UTC 2012


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 <erik at 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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20120915/4928110b/signature.pgp


More information about the svn-src-head mailing list