[Python-checkins] r71018 - python/branches/py3k/Python/symtable.c

benjamin.peterson python-checkins at python.org
Thu Apr 2 03:50:37 CEST 2009


Author: benjamin.peterson
Date: Thu Apr  2 03:50:37 2009
New Revision: 71018

Log:
fix ref leaks

Modified:
   python/branches/py3k/Python/symtable.c

Modified: python/branches/py3k/Python/symtable.c
==============================================================================
--- python/branches/py3k/Python/symtable.c	(original)
+++ python/branches/py3k/Python/symtable.c	Thu Apr  2 03:50:37 2009
@@ -766,6 +766,7 @@
 
 	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 @@
 	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);


More information about the Python-checkins mailing list