bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10069)

Based on the investigation by Xiang Zhang.
(cherry picked from commit df13df41a2)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-10-23 14:46:32 -07:00 committed by Victor Stinner
parent c46f0423a4
commit f7cefb427c
2 changed files with 3 additions and 3 deletions

View File

@ -0,0 +1,2 @@
Fixed a leak in Tkinter when pass the Python wrapper around Tcl_Obj back to
Tcl/Tk.

View File

@ -1101,9 +1101,7 @@ AsObj(PyObject *value)
}
if (PyTclObject_Check(value)) {
Tcl_Obj *v = ((PyTclObject*)value)->value;
Tcl_IncrRefCount(v);
return v;
return ((PyTclObject*)value)->value;
}
{