Skip to content

Commit 16681b9

Browse files
authored
Merge pull request #998 from Unity-Technologies/unity-master-fix-domain-list
Fix copy/paste error. Use size parameter for non-moving GC allocation… case 1062676: Fix crash on exit when domains are created
2 parents 25d8aef + 573175c commit 16681b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mono/metadata/domain.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,16 +299,16 @@ gc_alloc_fixed_non_heap_list (size_t size)
299299
if (mono_gc_is_moving ())
300300
return g_malloc0 (size);
301301
else
302-
return mono_gc_alloc_fixed (appdomain_list_size * sizeof (void*), MONO_GC_DESCRIPTOR_NULL, MONO_ROOT_SOURCE_DOMAIN, NULL, "Domain List");
302+
return mono_gc_alloc_fixed (size, MONO_GC_DESCRIPTOR_NULL, MONO_ROOT_SOURCE_DOMAIN, NULL, "Domain List");
303303
}
304304

305305
static void
306306
gc_free_fixed_non_heap_list (void *ptr)
307307
{
308308
if (mono_gc_is_moving ())
309-
return g_free (ptr);
309+
g_free (ptr);
310310
else
311-
return mono_gc_free_fixed (ptr);
311+
mono_gc_free_fixed (ptr);
312312
}
313313
/*
314314
* Allocate an id for domain and set domain->domain_id.

0 commit comments

Comments
 (0)