Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit df13df4

Browse files
bpo-34794: Fix a leak in Tkinter. (GH-10025)
Based on the investigation by Xiang Zhang.
1 parent 9f3ed3e commit df13df4

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

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)