diff Objects/typeobject.c @ 30085:dbde3dd31068 2.3

As penance for forgetting to flag my last checkins as bugfix candidates, just do the backport. These changes do not apply to release22-maint.
author Michael W. Hudson <mwh@python.net>
date Thu, 07 Aug 2003 15:08:55 +0000
parents 9deac1aa421d
children 6ef245136038 d6379620fb08
line wrap: on
line diff
--- a/Objects/typeobject.c	Thu Aug 07 11:56:23 2003 +0000
+++ b/Objects/typeobject.c	Thu Aug 07 15:08:55 2003 +0000
@@ -303,13 +303,16 @@
 	return r;
 
   bail:
+	Py_DECREF(type->tp_bases);
+	Py_DECREF(type->tp_base);
+	if (type->tp_mro != old_mro) {
+		Py_DECREF(type->tp_mro);
+	}
+
 	type->tp_bases = old_bases;
 	type->tp_base = old_base;
 	type->tp_mro = old_mro;
 
-	Py_DECREF(value);
-	Py_DECREF(new_base);
-
 	return -1;
 }