1. Armin Rigo
  2. cpython-withatomic

Commits

Andrew Kuchling  committed 9118ea7

[Backport r46044 | neal.norwitz]

Fix #132 from Coverity, retval could have been derefed
if a continue inside a try failed.

  • Participants
  • Parent commits d24eaae
  • Branches 2.4

Comments (0)

Files changed (1)

File Python/ceval.c

View file
  • Ignore whitespace
 
 		case CONTINUE_LOOP:
 			retval = PyInt_FromLong(oparg);
+			if (!retval) {
+				x = NULL;
+				break;
+			}
 			why = WHY_CONTINUE;
 			goto fast_block_end;