summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2024-05-06 19:25:20 (GMT)
committerGitHub <noreply@github.com>2024-05-06 19:25:20 (GMT)
commit67ce820d51d7f4bb7068ed560f4f2e2d83dd30d5 (patch)
treedfbe6d03919b35ce1baff5b087b11235544d7003
parent325a1da18d672171e9b9f794c1bfa7b79a7e5e59 (diff)
downloadcpython-67ce820d51d7f4bb7068ed560f4f2e2d83dd30d5.zip
cpython-67ce820d51d7f4bb7068ed560f4f2e2d83dd30d5.tar.gz
cpython-67ce820d51d7f4bb7068ed560f4f2e2d83dd30d5.tar.bz2
gh-71592: Fix a leak in tkinter.Tk destructor when _debug is true (GH-118664)
-rw-r--r--Modules/_tkinter.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 163449a..fc8af24 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();