unpack_sequence(): In finally clause, watch out for Py_DECREF

evaluating its arguments twice.
This commit is contained in:
Barry Warsaw 1997-08-25 22:30:51 +00:00
parent 09f9547393
commit 910105515e
1 changed files with 2 additions and 2 deletions

View File

@ -2076,8 +2076,8 @@ unpack_sequence(v, argcnt, sp)
"unpack sequence of wrong size");
/* fall through */
finally:
for (; i > 0; i--)
Py_DECREF(*sp++);
for (; i > 0; i--, sp++)
Py_DECREF(*sp);
return 0;
}