diff --git a/stand/libsa/sbrk.c b/stand/libsa/sbrk.c index 471e78ecf6df..00787fc54945 100644 --- a/stand/libsa/sbrk.c +++ b/stand/libsa/sbrk.c @@ -52,6 +52,9 @@ sbrk(int incr) { char *ret; + if (heapbase == 0) + panic("No heap setup\n"); + if ((heapsize + incr) <= maxheap) { ret = (char *)heapbase + heapsize; bzero(ret, incr);