summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-07-23 07:51:58 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-07-23 07:51:58 (GMT)
commitf71847e6459c4103189b705fd654cf1485d11b2a (patch)
treef53d61307645f2540100c9ac090c983e145318bc /Python
parent18b6adf9b2f581da04cf5cd6149b84408763ea6e (diff)
downloadcpython-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.c2
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);
}