mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bpo-38138: Fix memory leak introduced by interned strings (GH-16053)
Interned string needs to be decref'd https://bugs.python.org/issue38138 Automerge-Triggered-By: @matrixise
This commit is contained in:
parent
9a4963b932
commit
8d88e8c662
1 changed files with 1 additions and 0 deletions
|
|
@ -630,6 +630,7 @@ new_identifier(const char *n, struct compiling *c)
|
||||||
PyObject *args[2] = {form, id};
|
PyObject *args[2] = {form, id};
|
||||||
id2 = _PyObject_FastCall(c->c_normalize, args, 2);
|
id2 = _PyObject_FastCall(c->c_normalize, args, 2);
|
||||||
Py_DECREF(id);
|
Py_DECREF(id);
|
||||||
|
Py_DECREF(form);
|
||||||
if (!id2)
|
if (!id2)
|
||||||
return NULL;
|
return NULL;
|
||||||
if (!PyUnicode_Check(id2)) {
|
if (!PyUnicode_Check(id2)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue