@@ -45,6 +45,10 @@ void custom_ahfree(allocator_t *allocator, heap_t* heap, void *ptr) {
size_t three_blocks_size;
#endif /* COALESCING_FIXED || COALESCING_VARIABLE */
+ if(ptr == NULL) {
+ return;
+ }
+
size = get_size(ptr);
#ifdef HAVE_LOCKS