tree-ssa-alias.c (free_used_part_map): Add missing free.
authorDaniel Berlin <dberlin@dberlin.org>
Sun, 10 Jul 2005 19:34:45 +0000 (19:34 +0000)
committerDaniel Berlin <dberlin@gcc.gnu.org>
Sun, 10 Jul 2005 19:34:45 +0000 (19:34 +0000)
2005-07-10  Daniel Berlin  <dberlin@dberlin.org>

* tree-ssa-alias.c (free_used_part_map): Add missing free.
(up_insert): Ditto.

From-SVN: r101854

gcc/ChangeLog
gcc/tree-ssa-alias.c

index aebac49df958b6adb16bf49bddd4af76ec4573a3..e6771e8dfef0d8abe4f5db65605dad808ee816a4 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-10  Daniel Berlin  <dberlin@dberlin.org>
+
+       * tree-ssa-alias.c (free_used_part_map): Add missing free.
+       (up_insert): Ditto.
+
 2005-07-10  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (pa_commutative_p): Make PLUS commutative when
index f55e2d2edd5615a3e69c47fa01989d1c9d38f4d8..460a40499991a057139c2497ccc956e83e068194 100644 (file)
@@ -2344,6 +2344,7 @@ static void
 free_used_part_map (void *item)
 {
   free (((struct used_part_map *)item)->to);
+  free (item);
 }
 
 /* Lookup a used_part structure for a UID.  */
@@ -2372,6 +2373,8 @@ up_insert (unsigned int uid, used_part_t to)
   h->to = to;
   loc = htab_find_slot_with_hash (used_portions, h,
                                  uid, INSERT);
+  if (*loc != NULL)
+    free (*loc);
   *(struct used_part_map **)  loc = h;
 }