[Python-checkins] CVS: python/dist/src/Modules _tkinter.c,1.95,1.96
Guido van Rossum
python-dev@python.org
2000年4月27日 16:14:34 -0400 (EDT)
Update of /projects/cvsroot/python/dist/src/Modules
In directory eric:/projects/python/develop/guido/src/Modules
Modified Files:
_tkinter.c
Log Message:
Marc-Andre Lemburg:
Fixes a memory leak found by Fredrik Lundh.
Index: _tkinter.c
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Modules/_tkinter.c,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -r1.95 -r1.96
*** _tkinter.c 2000年03月31日 03:29:39 1.95
--- _tkinter.c 2000年04月27日 20:14:31 1.96
***************
*** 554,559 ****
if (!utf8)
return 0;
! return Tcl_NewStringObj (PyString_AS_STRING (utf8),
PyString_GET_SIZE (utf8));
}
else {
--- 554,561 ----
if (!utf8)
return 0;
! result = Tcl_NewStringObj (PyString_AS_STRING (utf8),
PyString_GET_SIZE (utf8));
+ Py_DECREF(utf8);
+ return result;
}
else {