summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-10-06 19:09:36 +0000
committerAndrew M. Kuchling <amk@amk.ca>2006-10-06 19:09:36 +0000
commitbec63ce9a17022af29d6b61614f329b4f7a5bd44 (patch)
tree6df72a0f28666da125bcfebe1d2423ec560106d6 /Python
parent5e27a6cb0b64eab189b474bd91f23c05cab94cb2 (diff)
downloadcpython-git-bec63ce9a17022af29d6b61614f329b4f7a5bd44.tar.gz
[Backport r46044 | neal.norwitz]
Fix #132 from Coverity, retval could have been derefed if a continue inside a try failed.
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index a6201b44ce..04dda2552c 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -2142,6 +2142,10 @@ PyEval_EvalFrame(PyFrameObject *f)
case CONTINUE_LOOP:
retval = PyInt_FromLong(oparg);
+ if (!retval) {
+ x = NULL;
+ break;
+ }
why = WHY_CONTINUE;
goto fast_block_end;