diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:51:58 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:51:58 +0000 |
commit | f71847e6459c4103189b705fd654cf1485d11b2a (patch) | |
tree | f53d61307645f2540100c9ac090c983e145318bc /Python/compile.c | |
parent | 18b6adf9b2f581da04cf5cd6149b84408763ea6e (diff) | |
download | cpython-git-f71847e6459c4103189b705fd654cf1485d11b2a.tar.gz |
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.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |