mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Issue #13020: Fix a reference leak when allocating a structsequence object fails.
Patch by Suman Saha.
This commit is contained in:
parent
f5f1fe0cb5
commit
37784ba5c0
2 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,9 @@ What's New in Python 3.2.3?
|
|||
Core and Builtins
|
||||
-----------------
|
||||
|
||||
- Issue #13020: Fix a reference leak when allocating a structsequence object
|
||||
fails. Patch by Suman Saha.
|
||||
|
||||
- Issue #13908: Ready types returned from PyType_FromSpec.
|
||||
|
||||
- Issue #11235: Fix OverflowError when trying to import a source file whose
|
||||
|
|
|
@ -129,6 +129,7 @@ structseq_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
|
|||
|
||||
res = (PyStructSequence*) PyStructSequence_New(type);
|
||||
if (res == NULL) {
|
||||
Py_DECREF(arg);
|
||||
return NULL;
|
||||
}
|
||||
for (i = 0; i < len; ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue