[mw-devel] MW3 r1309 - trunk/src/server

Justin Mitchell arthur at sucs.org
Sat Dec 1 19:38:15 GMT 2012


On Fri, Nov 30, 2012 at 10:37:40PM +0000, welshbyte at sucs.org wrote:
> Author: welshbyte
> Date: 2012-11-30 22:37:39 +0000 (Fri, 30 Nov 2012)
> New Revision: 1309
> 
> Modified:
>    trunk/src/server/servsock.c
> Log:
> Fix two leaks in the server's uptime code
> -		char *version = NULL;
> +		AUTOFREE_BUFFER version = NULL;
>  		asprintf(&version, "%s.%s.%s", VER_MAJ, VER_MIN, VER_TWK);

Oops, i should have read the man page more thoroughly, i assumed that
asprintf actually used alloca, in which case it wouldnt have needed
freeing




More information about the mw-devel mailing list