From: Zoltan Varga Date: Wed, 13 Jul 2016 19:03:14 +0000 (-0400) Subject: Merge pull request #3240 from alexanderkyte/aot_compiler_leaks X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=64c693851228345fcd6b3df03f7c25845d2820b5 Merge pull request #3240 from alexanderkyte/aot_compiler_leaks [runtime] Fix aot compiler leaks --- 64c693851228345fcd6b3df03f7c25845d2820b5 diff --cc mono/mini/aot-compiler.c index 1522b040dd3,9349265c287..6d96c5bcdb3 --- a/mono/mini/aot-compiler.c +++ b/mono/mini/aot-compiler.c @@@ -8865,23 -8869,12 +8872,27 @@@ emit_extra_methods (MonoAotCompile *acf encode_int (info_offsets [i], p, &p); } emit_aot_data (acfg, MONO_AOT_TABLE_EXTRA_METHOD_INFO_OFFSETS, "extra_method_info_offsets", buf, p - buf); + + g_free (buf); + g_free (info_offsets); + g_ptr_array_free (table, TRUE); } +static void +generate_aotid (guint8* aotid) +{ + gpointer *rand_handle; + MonoError error; + + mono_rand_open (); + rand_handle = mono_rand_init (NULL, 0); + + mono_rand_try_get_bytes (rand_handle, aotid, 16, &error); + mono_error_assert_ok (&error); + + mono_rand_close (rand_handle); +} + static void emit_exception_info (MonoAotCompile *acfg) {