]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-71592: Fix a leak in tkinter.Tk destructor when _debug is true (GH-118664)
authorSerhiy Storchaka <storchaka@gmail.com>
Mon, 6 May 2024 19:25:20 +0000 (22:25 +0300)
committerGitHub <noreply@github.com>
Mon, 6 May 2024 19:25:20 +0000 (19:25 +0000)
Modules/_tkinter.c

index 163449a927cf188ae612529c467fa3839e13a7ad..fc8af244adf4ed4ebb028283d098a0bbefebabe8 100644 (file)
@@ -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();