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,
PyObject *global, PyObject* child_free)
{
PyObject *temp_bound = NULL, *temp_global = NULL, *temp_free = NULL;
- int success = 0;
/* Copy the bound and global dictionaries.
if (!analyze_block(entry, temp_bound, temp_free, temp_global))
goto error;
- success = PyNumber_InPlaceOr(child_free, temp_free) >= 0;
- success = 1;
+ if (PyNumber_InPlaceOr(child_free, temp_free) < 0)
+ goto error;
+ Py_DECREF(child_free);
+ Py_DECREF(temp_bound);
+ Py_DECREF(temp_free);
+ Py_DECREF(temp_global);
+ return 1;
error:
Py_XDECREF(temp_bound);
Py_XDECREF(temp_free);
Py_XDECREF(temp_global);
- return success;
+ return 0;
}
static int