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

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


http://hg.python.org/cpython/rev/b2dac78db1c9
changeset:   78181:b2dac78db1c9
parent:      78179:571777bf5527
parent:      78180:b584c58c2286
user:        Jesus Cea <jcea at jcea.es>
date:        Thu Jul 19 21:18:45 2012 +0200
summary:
  MERGE: 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
@@ -121,6 +121,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
@@ -3133,8 +3133,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