From 67ce820d51d7f4bb7068ed560f4f2e2d83dd30d5 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 6 May 2024 22:25:20 +0300 Subject: [PATCH] gh-71592: Fix a leak in tkinter.Tk destructor when _debug is true (GH-118664) --- Modules/_tkinter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 163449a927cf18..fc8af244adf4ed 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -2972,6 +2972,7 @@ Tkapp_Dealloc(PyObject *self) ENTER_TCL Tcl_DeleteInterp(Tkapp_Interp(self)); LEAVE_TCL + Py_XDECREF(((TkappObject *)self)->trace); PyObject_Free(self); Py_DECREF(tp); DisableEventHook();