diff options
-rw-r--r-- | Modules/_tkinter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index e9dc72b..df281cd 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -1982,7 +1982,9 @@ PythonCmd(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) 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); |