tput: check sbrk return value

front
mischief 2015-08-25 03:06:36 -07:00
parent a284b57091
commit 2dec35524e
1 changed files with 2 additions and 0 deletions

View File

@ -36,6 +36,8 @@ main(int argc, char **argv)
bc = 0;
sec = 0;
buf = sbrk(buflen);
if(buf == (void*)-1)
sysfatal("out of memory");
cpid = rfork(RFPROC | RFMEM);
if(cpid == 0) {
while(1) {