Merge pull request #4621 from alexanderkyte/strdup_env
[mono.git] / mono / mini / seq-points.c
index 8ff2e1e3ec6ca95145828a077e03d8a48cb8d709..88f732d9fc350b9e8a6e5b8bda942e9670a3b0c9 100644 (file)
@@ -1,5 +1,6 @@
-/*
- * seq-points.c: Sequence Points functions
+/**
+ * \file
+ * Sequence Points functions
  *
  * Authors:
  *   Marcos Henrich (marcos.henrich@xamarin.com)
@@ -80,7 +81,7 @@ recursively_make_pred_seq_points (MonoCompile *cfg, MonoBasicBlock *bb)
                }
        } 
 
-       g_free (predecessors);
+       g_array_free (predecessors, TRUE);
 }
 
 static void
@@ -168,7 +169,7 @@ mono_save_seq_point_info (MonoCompile *cfg)
                                if (l) {
                                        endfinally_seq_point = (MonoInst *)l->data;
 
-                                       for (bb2 = cfg->bb_entry; bb2; bb2 = bb2->next_bb) {
+                                       for (bb2 = bb->next_bb; bb2; bb2 = bb2->next_bb) {
                                                GSList *l = g_slist_last (bb2->seq_points);
 
                                                if (l) {
@@ -223,6 +224,8 @@ mono_save_seq_point_info (MonoCompile *cfg)
                }
        }
 
+       g_free (seq_points);
+
        if (has_debug_data)
                g_free (next);