diff options
author | Philip Jenvey <pjenvey@underboss.org> | 2009-09-29 04:41:54 (GMT) |
---|---|---|
committer | Philip Jenvey <pjenvey@underboss.org> | 2009-09-29 04:41:54 (GMT) |
commit | 87b4e726bed0dfa7071ffc5528969039a96ea0c4 (patch) | |
tree | 8ee56bc7671c9b03bc0cc8a8e9257eac7a5c44a4 /Modules | |
parent | a89633c4f7566193cf6ac4be9219672e7f7abc9d (diff) | |
download | cpython-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.c | 2 |
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); } |