summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libc/stdlib/malloc/free.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libc/stdlib/malloc/free.c b/libc/stdlib/malloc/free.c
index 32e1f766b..cb08d9e60 100644
--- a/libc/stdlib/malloc/free.c
+++ b/libc/stdlib/malloc/free.c
@@ -26,9 +26,12 @@ free (void *mem)
struct heap_free_area *fa;
struct heap *heap = &__malloc_heap;
- if (unlikely (! mem))
+ /* Check for special cases. */
+ if (__malloc_unlikely (! mem))
return;
+ /* Normal free. */
+
size = MALLOC_SIZE (mem);
mem = MALLOC_BASE (mem);