Take a shortcut when freeing in heap_realloc(), we already know the address belongs to our heap.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26200 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
291e114333
commit
86a38aedf4
@ -1158,7 +1158,7 @@ heap_realloc(heap_allocator *heap, void *address, void **newAddress,
|
||||
|
||||
// copy the old data and free the old allocation
|
||||
memcpy(*newAddress, address, min_c(maxSize, newSize));
|
||||
free(address);
|
||||
heap_free(heap, address);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user