projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52c1a6a
)
bpo-37954: Fix reference leak in the symtable (GH-15514)
author
Pablo Galindo
<Pablogsal@gmail.com>
Mon, 26 Aug 2019 15:14:07 +0000
(16:14 +0100)
committer
GitHub
<noreply@github.com>
Mon, 26 Aug 2019 15:14:07 +0000
(16:14 +0100)
Python/symtable.c
patch
|
blob
|
history
diff --git
a/Python/symtable.c
b/Python/symtable.c
index 18ea57690b5dea7d62482dc59de29fa095fd53ae..2795e0f1115b8df9cd3344f88c560d310c2ee7d8 100644
(file)
--- a/
Python/symtable.c
+++ b/
Python/symtable.c
@@
-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