diff options
author | Yury Selivanov <yury@magic.io> | 2016-11-09 14:42:14 (GMT) |
---|---|---|
committer | Yury Selivanov <yury@magic.io> | 2016-11-09 14:42:14 (GMT) |
commit | d2fd3599abeed393ccdf4ee5cf1c7b346ba4a022 (patch) | |
tree | 396e99bdb5e58ca4b353aa640b51ed7b1a9bb2c0 | |
parent | 58c534dd6cac474776e173fbeb06efbf46aff028 (diff) | |
download | cpython-d2fd3599abeed393ccdf4ee5cf1c7b346ba4a022.zip cpython-d2fd3599abeed393ccdf4ee5cf1c7b346ba4a022.tar.gz cpython-d2fd3599abeed393ccdf4ee5cf1c7b346ba4a022.tar.bz2 |
ssue #27942: Fix memory leak in codeobject.c
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rw-r--r-- | Objects/codeobject.c | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -110,6 +110,8 @@ Core and Builtins - Issue #27443: __length_hint__() of bytearray iterators no longer return a negative integer for a resized bytearray. +- Issue #27942: Fix memory leak in codeobject.c + Library ------- diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 9df87b0..c334626 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -69,6 +69,7 @@ intern_string_constants(PyObject *tuple) intern_string_constants(v); } else if (PyFrozenSet_CheckExact(v)) { + PyObject *w = v; PyObject *tmp = PySequence_Tuple(v); if (tmp == NULL) { PyErr_Clear(); @@ -81,6 +82,7 @@ intern_string_constants(PyObject *tuple) } else { PyTuple_SET_ITEM(tuple, i, v); + Py_DECREF(w); modified = 1; } } |