diff Python/ceval.c @ 38217:2195972f7391 legacy-trunk

Fix #132 from Coverity, retval could have been derefed if a continue inside a try failed.
author Neal Norwitz <nnorwitz@gmail.com>
date Fri, 19 May 2006 06:31:23 +0000
parents eb4879c085aa
children 4bd299d00e4c
line wrap: on
line diff
--- a/Python/ceval.c	Fri May 19 00:03:55 2006 +0000
+++ b/Python/ceval.c	Fri May 19 06:31:23 2006 +0000
@@ -2173,6 +2173,10 @@
 
 		case CONTINUE_LOOP:
 			retval = PyInt_FromLong(oparg);
+			if (!retval) {
+				x = NULL;
+				break;
+			}
 			why = WHY_CONTINUE;
 			goto fast_block_end;