summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-04-02 01:50:37 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-04-02 01:50:37 (GMT)
commit22081a1364f1f6e56327b6d0b167d84684c479e1 (patch)
treee6117e663b9325c6396927f20713da2211b95be9 /Python
parent9762a3eb87ac47fc2d72c99849cc8041ae53b06e (diff)
downloadcpython-22081a1364f1f6e56327b6d0b167d84684c479e1.zip
cpython-22081a1364f1f6e56327b6d0b167d84684c479e1.tar.gz
cpython-22081a1364f1f6e56327b6d0b167d84684c479e1.tar.bz2
fix ref leaks
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 59af958..92b2232 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -766,6 +766,7 @@ analyze_block(PySTEntryObject *ste, PyObject *bound, PyObject *free,
if (PyNumber_InPlaceOr(newfree, allfree) < 0)
goto error;
+ Py_DECREF(newfree);
/* Check if any local variables must be converted to cell variables */
if (ste->ste_type == FunctionBlock && !analyze_cells(scopes, newfree,
@@ -824,6 +825,7 @@ analyze_child_block(PySTEntryObject *entry, PyObject *bound, PyObject *free,
if (!analyze_block(entry, temp_bound, temp_free, temp_global))
goto error;
success = PyNumber_InPlaceOr(child_free, temp_free) >= 0;
+ Py_DECREF(child_free);
success = 1;
error:
Py_XDECREF(temp_bound);