From 86a38aedf4b645a62312c29c927051bab9c4b0a1 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Tue, 1 Jul 2008 20:18:02 +0000 Subject: [PATCH] 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 --- src/system/kernel/heap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/heap.cpp b/src/system/kernel/heap.cpp index d7b9a7ea9a..e277a5b32c 100644 --- a/src/system/kernel/heap.cpp +++ b/src/system/kernel/heap.cpp @@ -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; }