MERGE: Closes #15396: memory leak in tkinter

This commit is contained in:
Jesus Cea 2012-07-19 21:18:45 +02:00
commit 3cd346ae33
2 changed files with 4 additions and 1 deletions

View File

@ -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

View File

@ -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;