From: Neal Norwitz Date: Sun, 23 Jul 2006 07:51:58 +0000 (+0000) Subject: If the for loop isn't entered, entryblock will be NULL. If passed X-Git-Tag: v2.5b3~197 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f71847e6459c4103189b705fd654cf1485d11b2a;p=python 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. --- diff --git a/Python/compile.c b/Python/compile.c index 564df18473..5ed9893c80 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -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); }