diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:51:58 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-07-23 07:51:58 (GMT) |
commit | f71847e6459c4103189b705fd654cf1485d11b2a (patch) | |
tree | f53d61307645f2540100c9ac090c983e145318bc /Python | |
parent | 18b6adf9b2f581da04cf5cd6149b84408763ea6e (diff) | |
download | cpython-f71847e6459c4103189b705fd654cf1485d11b2a.zip cpython-f71847e6459c4103189b705fd654cf1485d11b2a.tar.gz cpython-f71847e6459c4103189b705fd654cf1485d11b2a.tar.bz2 |
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')
-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 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); } |