Coverity found refleak: need to free 'v' after calling Tkinter_Error().

Will backport to release24.
This commit is contained in:
Thomas Wouters 2006-03-07 14:04:31 +00:00
parent 58780d2642
commit a74a84d4cb

View file

@ -686,8 +686,11 @@ Tkapp_New(char *screenName, char *baseName, char *className,
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();