mirror of
https://github.com/python/cpython.git
synced 2025-12-09 02:35:14 +00:00
Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
This commit is contained in:
parent
c39cd783fb
commit
c66ed457ef
2 changed files with 4 additions and 0 deletions
|
|
@ -9,6 +9,9 @@ What's New in Python 2.7.3?
|
||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #13020: Fix a reference leak when allocating a structsequence object
|
||||||
|
fails. Patch by Suman Saha.
|
||||||
|
|
||||||
- Issue #11235: Fix OverflowError when trying to import a source file whose
|
- Issue #11235: Fix OverflowError when trying to import a source file whose
|
||||||
modification time doesn't fit in a 32-bit timestamp.
|
modification time doesn't fit in a 32-bit timestamp.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -201,6 +201,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
||||||
|
|
||||||
res = (PyStructSequence*) PyStructSequence_New(type);
|
res = (PyStructSequence*) PyStructSequence_New(type);
|
||||||
if (res == NULL) {
|
if (res == NULL) {
|
||||||
|
Py_DECREF(arg);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
for (i = 0; i < len; ++i) {
|
for (i = 0; i < len; ++i) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue