From f71847e6459c4103189b705fd654cf1485d11b2a Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sun, 23 Jul 2006 07:51:58 +0000 Subject: 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. --- Python/compile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/compile.c b/Python/compile.c index 564df18..5ed9893 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); } -- cgit v0.12