]> granicus.if.org Git - python/commitdiff
fix ref leaks
authorBenjamin Peterson <benjamin@python.org>
Thu, 2 Apr 2009 01:50:37 +0000 (01:50 +0000)
committerBenjamin Peterson <benjamin@python.org>
Thu, 2 Apr 2009 01:50:37 +0000 (01:50 +0000)
Python/symtable.c

index 59af9581d35c5db22e1f448f7c1a02625436761e..92b223276fcc4b5cae5c476e975288a3a7f062b6 100644 (file)
@@ -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);