bpo-37954: Fix reference leak in the symtable (GH-15514)
This commit is contained in:
parent
52c1a6a15a
commit
4901dc46da
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue