Commit 4901dc46 authored by Pablo Galindo's avatar Pablo Galindo Committed by GitHub

bpo-37954: Fix reference leak in the symtable (GH-15514)

parent 52c1a6a1
......@@ -999,7 +999,9 @@ symtable_lookup(struct symtable *st, PyObject *name)
PyObject *mangled = _Py_Mangle(st->st_private, name);
if (!mangled)
return 0;
return _PyST_GetSymbol(st->st_cur, mangled);
long ret = _PyST_GetSymbol(st->st_cur, mangled);
Py_DECREF(mangled);
return ret;
}
static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment