diff --git a/modules/src/malloc/mal.c b/modules/src/malloc/mal.c index 7043f19e8..5ff02b0fe 100644 --- a/modules/src/malloc/mal.c +++ b/modules/src/malloc/mal.c @@ -152,7 +152,13 @@ malloc(n) free(addr) char *addr; {check_mallinks("free entry");{ - register mallink *ml = mallink_of_block(addr); + register mallink *ml; + + if (addr == 0) { + check_mallinks("free(0) very fast exit"); + return; + } + ml = mallink_of_block(addr); #ifdef STORE