Skip to content

Commit 6c10650

Browse files
committed
Merge 3.5 (issue #27942)
2 parents bafd4f2 + d2fd359 commit 6c10650

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -588,6 +588,8 @@ Core and Builtins
588588

589589
- Issue #28008: Implement PEP 530 -- asynchronous comprehensions.
590590

591+
- Issue #27942: Fix memory leak in codeobject.c
592+
591593
Library
592594
-------
593595

Objects/codeobject.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ intern_string_constants(PyObject *tuple)
7777
intern_string_constants(v);
7878
}
7979
else if (PyFrozenSet_CheckExact(v)) {
80+
PyObject *w = v;
8081
PyObject *tmp = PySequence_Tuple(v);
8182
if (tmp == NULL) {
8283
PyErr_Clear();
@@ -89,6 +90,7 @@ intern_string_constants(PyObject *tuple)
8990
}
9091
else {
9192
PyTuple_SET_ITEM(tuple, i, v);
93+
Py_DECREF(w);
9294
modified = 1;
9395
}
9496
}

0 commit comments

Comments
 (0)