diff --git a/Kernel/kmalloc.cpp b/Kernel/kmalloc.cpp index 0312fa7db9..af65f5f341 100644 --- a/Kernel/kmalloc.cpp +++ b/Kernel/kmalloc.cpp @@ -166,11 +166,11 @@ void* kmalloc_impl(size_t size) void kfree(void *ptr) { - ++g_kfree_call_count; if (!ptr) return; InterruptDisabler disabler; + ++g_kfree_call_count; auto* a = (allocation_t*)((((byte*)ptr) - sizeof(allocation_t)));