* bitmap.c (bitmap_operation): Don't leak bitmap elements.

From-SVN: r32038
This commit is contained in:
Jason Merrill 2000-02-17 20:24:11 +00:00 committed by Jason Merrill
parent 9185a8d526
commit b9a73e32f1
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2000-02-17 Jason Merrill <jason@casey.cygnus.com>
* bitmap.c (bitmap_operation): Don't leak bitmap elements.
2000-02-17 Mark Mitchell <mark@codesourcery.com>
* function.c (thread_prologue_and_epilogue_insns): Put a line note

View File

@ -477,7 +477,7 @@ bitmap_operation (to, from1, from2, operation)
changed = 1;
to_tmp = to_ptr;
to_ptr = to_ptr->next;
to_tmp = bitmap_free;
to_tmp->next = bitmap_free;
bitmap_free = to_tmp;
}
if (to_ptr && to_ptr->indx == indx)
@ -517,6 +517,11 @@ bitmap_operation (to, from1, from2, operation)
to_tmp->indx = indx;
bitmap_element_link (to, to_tmp);
}
else
{
to_tmp->next = bitmap_free;
bitmap_free = to_tmp;
}
}
/* If we have elements of TO left over, free the lot. */