[runtime] Fix leak in generic sharing
authorAlexander Kyte <alkyte@microsoft.com>
Fri, 8 Jul 2016 22:40:02 +0000 (18:40 -0400)
committerZoltan Varga <vargaz@gmail.com>
Tue, 19 Jul 2016 18:08:51 +0000 (14:08 -0400)
mono/mini/mini-amd64-gsharedvt.c

index 591ebafb228ea3bb025e6e4290e77c5f3743bf80..6a4e7af9d4485ea1894c08f45c9421519744cc12 100644 (file)
@@ -513,6 +513,9 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
 
        info->stack_usage = ALIGN_TO (info->stack_usage, MONO_ARCH_FRAME_ALIGNMENT);
 
+       g_free (callee_cinfo);
+       g_free (caller_cinfo);
+
        DEBUG_AMD64_GSHAREDVT_PRINT ("allocated an info at %p stack usage %d\n", info, info->stack_usage);
        return info;
 }