[Mono-dev] [PATCH] leak in ves_icall_Type_MakeGenericType

Paolo Molaro lupus at ximian.com
Tue Dec 5 13:20:33 EST 2006


On 12/05/06 Robert Jordan wrote:
> Index: metadata/icall.c
> ===================================================================
> --- metadata/icall.c	(revision 69048)
> +++ metadata/icall.c	(working copy)
> @@ -1999,7 +1999,7 @@
>  	MONO_ARCH_SAVE_REGS;
>  
>  	count = mono_array_length (type_array);
> -	types = g_new0 (MonoType *, count);
> +	types = g_newa (MonoType *, count);
>  
>  	for (i = 0; i < count; i++) {
>  		MonoReflectionType *t = mono_array_get (type_array, gpointer, i);

Since this is not a fast path, I added the proper g_free() call in svn.
Thanks!

lupus

-- 
-----------------------------------------------------------------
lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better



More information about the Mono-devel-list mailing list