[Python-checkins] cpython (3.2): Closes #15396: memory leak in tkinter

jesus.cea python-checkins at python.org
Thu Jul 19 21:19:10 CEST 2012


http://hg.python.org/cpython/rev/b584c58c2286
changeset:   78180:b584c58c2286
branch:      3.2
parent:      78178:7140d97d36fd
user:        Jesus Cea <jcea at jcea.es>
date:        Thu Jul 19 21:18:07 2012 +0200
summary:
  Closes #15396: memory leak in tkinter

files:
  Doc/ACKS.txt       |  1 +
  Modules/_tkinter.c |  4 +++-
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Doc/ACKS.txt b/Doc/ACKS.txt
--- a/Doc/ACKS.txt
+++ b/Doc/ACKS.txt
@@ -120,6 +120,7 @@
    * 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
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -3135,8 +3135,10 @@
 
     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;

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list