[Python-checkins] r80197 - python/branches/release31-maint/Objects/setobject.c

raymond.hettinger python-checkins at python.org
Sun Apr 18 22:28:33 CEST 2010


Author: raymond.hettinger
Date: Sun Apr 18 22:28:33 2010
New Revision: 80197

Log:
Issue 8420: Fix ref counting problem in set_repr().

Modified:
   python/branches/release31-maint/Objects/setobject.c

Modified: python/branches/release31-maint/Objects/setobject.c
==============================================================================
--- python/branches/release31-maint/Objects/setobject.c	(original)
+++ python/branches/release31-maint/Objects/setobject.c	Sun Apr 18 22:28:33 2010
@@ -601,10 +601,8 @@
 
 	listrepr = PyObject_Repr(keys);
 	Py_DECREF(keys);
-	if (listrepr == NULL) {
-		Py_DECREF(keys);
+	if (listrepr == NULL)
 		goto done;
-	}
 	newsize = PyUnicode_GET_SIZE(listrepr);
 	result = PyUnicode_FromUnicode(NULL, newsize);
 	if (result) {


More information about the Python-checkins mailing list