[Python-checkins] r42889 - python/branches/release24-maint/Modules/_tkinter.c
thomas.wouters
python-checkins at python.org
Tue Mar 7 15:06:31 CET 2006
Author: thomas.wouters
Date: Tue Mar 7 15:06:31 2006
New Revision: 42889
Modified:
python/branches/release24-maint/Modules/_tkinter.c
Log:
Backport trunk's r42888 (thomas.wouters):
Coverity found refleak: need to free 'v' after calling Tkinter_Error().
Modified: python/branches/release24-maint/Modules/_tkinter.c
==============================================================================
--- python/branches/release24-maint/Modules/_tkinter.c (original)
+++ python/branches/release24-maint/Modules/_tkinter.c Tue Mar 7 15:06:31 2006
@@ -676,8 +676,11 @@
ckfree(args);
}
- if (Tcl_AppInit(v->interp) != TCL_OK)
- return (TkappObject *)Tkinter_Error((PyObject *)v);
+ if (Tcl_AppInit(v->interp) != TCL_OK) {
+ PyObject *result = Tkinter_Error((PyObject *)v);
+ Py_DECREF((PyObject *)v);
+ return (TkappObject *)result;
+ }
EnableEventHook();
More information about the Python-checkins
mailing list