diff --git a/src/kernel/core/heap.c b/src/kernel/core/heap.c index 83c611881e..ab21a7aca8 100644 --- a/src/kernel/core/heap.c +++ b/src/kernel/core/heap.c @@ -284,7 +284,11 @@ out: TRACE(("kmalloc: asked to allocate size %d, returning ptr = %p\n", size, address)); #if PARANOID_KMALLOC - memset(address,0xCC,size); + memset(address, 0xCC, size); +#endif + +#if PARANOID_POINTER_CHECK + ptrchecklist_store(address); #endif #if USE_WALL @@ -304,10 +308,6 @@ out: } #endif -#if PARANOID_POINTER_CHECK - ptrchecklist_store(address); -#endif - return address; }