diff Python/ceval.c @ 40038:9118ea781fd5 2.4

[Backport r46044 | neal.norwitz] Fix #132 from Coverity, retval could have been derefed if a continue inside a try failed.
author Andrew M. Kuchling <amk@amk.ca>
date Fri, 06 Oct 2006 19:09:36 +0000
parents 42abfb391300
children 6b91c0dcea58
line wrap: on
line diff
--- a/Python/ceval.c	Fri Oct 06 18:59:10 2006 +0000
+++ b/Python/ceval.c	Fri Oct 06 19:09:36 2006 +0000
@@ -2142,6 +2142,10 @@
 
 		case CONTINUE_LOOP:
 			retval = PyInt_FromLong(oparg);
+			if (!retval) {
+				x = NULL;
+				break;
+			}
 			why = WHY_CONTINUE;
 			goto fast_block_end;