diff Modules/_tkinter.c @ 42511:166c740536b5 legacy-trunk

Backport r56875 from py3k; double LEAVE_PYTHON when AsString() fails in PythonCmd().
author Guido van Rossum <guido@python.org>
date Thu, 09 Aug 2007 21:47:11 +0000
parents 6620a510e9a9
children 26384b8180c7
line wrap: on
line diff
--- a/Modules/_tkinter.c	Wed Aug 08 13:50:02 2007 +0000
+++ b/Modules/_tkinter.c	Thu Aug 09 21:47:11 2007 +0000
@@ -2028,7 +2028,9 @@
 
 	s = AsString(res, tmp);
 	if (s == NULL) {
-		rv = PythonCmd_Error(interp);
+		Py_DECREF(res);
+		Py_DECREF(tmp);
+		return PythonCmd_Error(interp);
 	}
 	else {
 		Tcl_SetResult(Tkapp_Interp(self), s, TCL_VOLATILE);