Skip to content

Commit

Permalink
bpo-37954: Fix reference leak in the symtable (pythonGH-15514)
Browse files Browse the repository at this point in the history
  • Loading branch information
pablogsal authored Aug 26, 2019
1 parent 52c1a6a commit 4901dc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Python/symtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4901dc4

Please sign in to comment.