summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorPhilip Jenvey <pjenvey@underboss.org>2009-09-29 04:41:54 (GMT)
committerPhilip Jenvey <pjenvey@underboss.org>2009-09-29 04:41:54 (GMT)
commit87b4e726bed0dfa7071ffc5528969039a96ea0c4 (patch)
tree8ee56bc7671c9b03bc0cc8a8e9257eac7a5c44a4 /Modules
parenta89633c4f7566193cf6ac4be9219672e7f7abc9d (diff)
downloadcpython-87b4e726bed0dfa7071ffc5528969039a96ea0c4.zip
cpython-87b4e726bed0dfa7071ffc5528969039a96ea0c4.tar.gz
cpython-87b4e726bed0dfa7071ffc5528969039a96ea0c4.tar.bz2
Merged revisions 75123 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r75123 | philip.jenvey | 2009-09-28 21:32:44 -0700 (Mon, 28 Sep 2009) | 4 lines #6990: clear threading.local's key only after its thread state is removed: fixes local subclasses leaving old state around after a ref cycle GC which could be recycled by new locals ........
Diffstat (limited to 'Modules')
-rw-r--r--Modules/threadmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c
index a87ddb3..ca47ebf 100644
--- a/Modules/threadmodule.c
+++ b/Modules/threadmodule.c
@@ -227,7 +227,6 @@ local_traverse(localobject *self, visitproc visit, void *arg)
static int
local_clear(localobject *self)
{
- Py_CLEAR(self->key);
Py_CLEAR(self->args);
Py_CLEAR(self->kw);
Py_CLEAR(self->dict);
@@ -249,6 +248,7 @@ local_dealloc(localobject *self)
PyDict_DelItem(tstate->dict, self->key);
}
+ Py_XDECREF(self->key);
local_clear(self);
Py_TYPE(self)->tp_free((PyObject*)self);
}