commit | 48aa605337a820b476e18896564a5ef877c5b27d | [log] [tgz] |
---|---|---|
author | Yury Selivanov <yury@magic.io> | Wed Nov 09 09:41:15 2016 -0500 |
committer | Yury Selivanov <yury@magic.io> | Wed Nov 09 09:41:15 2016 -0500 |
tree | 2f2ef03e6a66335461f7f3045ceda62359864bdc | |
parent | a8760275bd59fb8d8be1f1bf05313fed31c08321 [diff] [blame] |
Issue #27942: Fix memory leak in codeobject.c
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 79ac1b5..a66aa69 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c
@@ -65,6 +65,7 @@ intern_string_constants(v); } else if (PyFrozenSet_CheckExact(v)) { + PyObject *w = v; PyObject *tmp = PySequence_Tuple(v); if (tmp == NULL) { PyErr_Clear(); @@ -77,6 +78,7 @@ } else { PyTuple_SET_ITEM(tuple, i, v); + Py_DECREF(w); modified = 1; } }