summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2012-07-19 19:18:45 (GMT)
committerJesus Cea <jcea@jcea.es>2012-07-19 19:18:45 (GMT)
commit3cd346ae3378fa6de523c037e8b57651d39a79bd (patch)
tree9c95d62c5e4f0fb0e638197a701d441b2bd84713
parentf4cc2161d567460f27a1390277ba6c70581ebc0d (diff)
parentef86d12979b878bd5f3a1ffc73f5373c722eb664 (diff)
downloadcpython-3cd346ae3378fa6de523c037e8b57651d39a79bd.zip
cpython-3cd346ae3378fa6de523c037e8b57651d39a79bd.tar.gz
cpython-3cd346ae3378fa6de523c037e8b57651d39a79bd.tar.bz2
MERGE: Closes #15396: memory leak in tkinter
-rw-r--r--Doc/ACKS.txt1
-rw-r--r--Modules/_tkinter.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt
index b64c650..5636e05 100644
--- a/Doc/ACKS.txt
+++ b/Doc/ACKS.txt
@@ -121,6 +121,7 @@ docs@python.org), and we'll be glad to correct the problem.
* Thomas Lamb
* Detlef Lannert
* Piers Lauder
+ * Julia Lawall
* Glyph Lefkowitz
* Robert Lehmann
* Marc-André Lemburg
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index 630ce72..f6cd88d 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -3133,8 +3133,10 @@ PyInit__tkinter(void)
PyDict_SetItemString(d, "TkappType", (PyObject *)&Tkapp_Type);
- if (PyType_Ready(&Tktt_Type) < 0)
+ if (PyType_Ready(&Tktt_Type) < 0) {
+ Py_DECREF(m);
return NULL;
+ }
PyDict_SetItemString(d, "TkttType", (PyObject *)&Tktt_Type);
Py_TYPE(&PyTclObject_Type) = &PyType_Type;