[runtime] Prevent leak by copying list with no other references
authorAlexander Kyte <alkyte@microsoft.com>
Wed, 6 Jul 2016 22:09:28 +0000 (18:09 -0400)
committerAlexander Kyte <alkyte@microsoft.com>
Thu, 7 Jul 2016 19:22:13 +0000 (15:22 -0400)
mono/mini/mini.c

index 870f141b7737d9eab1c3bb23a1a8f4bdb9a7e3d4..29d455e7f634ebd786180ab810d9526c128c3fa6 100644 (file)
@@ -1169,7 +1169,7 @@ mono_allocate_stack_slots2 (MonoCompile *cfg, gboolean backward, guint32 *stack_
                vars = g_list_prepend (vars, vmv);
        }
 
-       vars = g_list_sort (g_list_copy (vars), compare_by_interval_start_pos_func);
+       vars = g_list_sort (vars, compare_by_interval_start_pos_func);
 
        /* Sanity check */
        /*