Skip to content

Commit 8d88e8c

Browse files
DinoVmiss-islington
authored andcommitted
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
1 parent 9a4963b commit 8d88e8c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Python/ast.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,7 @@ new_identifier(const char *n, struct compiling *c)
630630
PyObject *args[2] = {form, id};
631631
id2 = _PyObject_FastCall(c->c_normalize, args, 2);
632632
Py_DECREF(id);
633+
Py_DECREF(form);
633634
if (!id2)
634635
return NULL;
635636
if (!PyUnicode_Check(id2)) {

0 commit comments

Comments
 (0)