diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2018-10-23 22:40:54 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-23 22:40:54 +0300 |
| commit | df13df41a25765d8a39a77220691698498e758d4 (patch) | |
| tree | 8b1f3021333df1a7c91ea183123afa88b758f2d9 | |
| parent | 9f3ed3e213b30059087d059a7d1d3b2527fa8654 (diff) | |
| download | cpython-git-df13df41a25765d8a39a77220691698498e758d4.tar.gz | |
bpo-34794: Fix a leak in Tkinter. (GH-10025)
Based on the investigation by Xiang Zhang.
| -rw-r--r-- | Misc/NEWS.d/next/Library/2018-10-21-14-53-19.bpo-34794.yt3R4-.rst | 2 | ||||
| -rw-r--r-- | Modules/_tkinter.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-10-21-14-53-19.bpo-34794.yt3R4-.rst b/Misc/NEWS.d/next/Library/2018-10-21-14-53-19.bpo-34794.yt3R4-.rst new file mode 100644 index 0000000000..770807fc76 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-10-21-14-53-19.bpo-34794.yt3R4-.rst @@ -0,0 +1,2 @@ +Fixed a leak in Tkinter when pass the Python wrapper around Tcl_Obj back to +Tcl/Tk. diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c index 93d4dbc5f6..fa26859987 100644 --- a/Modules/_tkinter.c +++ b/Modules/_tkinter.c @@ -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; } { |
