Apply fix of r32951 to malloc debug heap as well.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32953 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Michael Lotz 2009-09-06 05:11:48 +00:00
parent da3412492a
commit a712373138
1 changed files with 2 additions and 1 deletions

View File

@ -1335,6 +1335,7 @@ heap_free(heap_allocator *heap, void *address)
area = heap->areas;
while (area != NULL && heap->empty_areas > 1) {
heap_area *next = area->next;
if (area->area >= 0
&& area->free_page_count == area->page_count
&& heap_remove_area(heap, area) == B_OK) {
@ -1342,7 +1343,7 @@ heap_free(heap_allocator *heap, void *address)
heap->empty_areas--;
}
area = area->next;
area = next;
}
}