Skip to content

Commit f7cefb4

Browse files
miss-islingtonserhiy-storchaka
authored andcommitted
bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10069)
Based on the investigation by Xiang Zhang. (cherry picked from commit df13df4) Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent c46f042 commit f7cefb4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed a leak in Tkinter when pass the Python wrapper around Tcl_Obj back to
2+
Tcl/Tk.

‎Modules/_tkinter.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,9 +1101,7 @@ AsObj(PyObject *value)
11011101
}
11021102

11031103
if (PyTclObject_Check(value)) {
1104-
Tcl_Obj *v = ((PyTclObject*)value)->value;
1105-
Tcl_IncrRefCount(v);
1106-
return v;
1104+
return ((PyTclObject*)value)->value;
11071105
}
11081106

11091107
{

0 commit comments

Comments
 (0)