If the for loop isn't entered, entryblock will be NULL. If passed

to stackdepth_walk it will be dereffed.

Not sure if I found with failmalloc or Klockwork #55.
This commit is contained in:
Neal Norwitz 2006-07-23 07:51:58 +00:00
parent 18b6adf9b2
commit f71847e645

View file

@ -4022,6 +4022,8 @@ stackdepth(struct compiler *c)
b->b_startdepth = INT_MIN;
entryblock = b;
}
if (!entryblock)
return 0;
return stackdepth_walk(c, entryblock, 0, 0);
}