summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2018-10-28 19:36:02 +0200
committerGitHub <noreply@github.com>2018-10-28 19:36:02 +0200
commitaaea2802da0a074c695ab86911d8bcc0b2dd5ec5 (patch)
tree4db3ae1600893ab8f326e2e4e109cd305719885b /Modules
parent4704c33d9ccccd73582499640b51cb430e3bd4f2 (diff)
downloadcpython-git-aaea2802da0a074c695ab86911d8bcc0b2dd5ec5.tar.gz
[2.7] bpo-34794: Fix a leak in Tkinter. (GH-10025) (GH-10181)
Based on the investigation by Xiang Zhang. (cherry picked from commit df13df41a25765d8a39a77220691698498e758d4)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tkinter.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/Modules/_tkinter.c b/Modules/_tkinter.c
index c71ffd016a..58640e240f 100644
--- a/Modules/_tkinter.c
+++ b/Modules/_tkinter.c
@@ -1205,10 +1205,8 @@ AsObj(PyObject *value)
}
#endif
- if(PyTclObject_Check(value)) {
- Tcl_Obj *v = ((PyTclObject*)value)->value;
- Tcl_IncrRefCount(v);
- return v;
+ if (PyTclObject_Check(value)) {
+ return ((PyTclObject*)value)->value;
}
{