summaryrefslogtreecommitdiffstats
path: root/Modules/_io
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-09-30 02:49:05 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-09-30 02:49:05 (GMT)
commit58ee2d31ab2dc039c6929347bf6cfb0cfd827198 (patch)
tree23c45b7a11cc0ffed5e4a8e9f7bc0951d2a1edfc /Modules/_io
parente87b7eafe4f7535938584298c7db2cefe864846f (diff)
parentc44eb73473f31dfde1e8cb6ba485a309e3b0757e (diff)
downloadcpython-58ee2d31ab2dc039c6929347bf6cfb0cfd827198.zip
cpython-58ee2d31ab2dc039c6929347bf6cfb0cfd827198.tar.gz
cpython-58ee2d31ab2dc039c6929347bf6cfb0cfd827198.tar.bz2
merge 3.4 (#22517)
Diffstat (limited to 'Modules/_io')
-rw-r--r--Modules/_io/bufferedio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 2feda5a..3f14a20 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -2343,6 +2343,8 @@ static void
bufferedrwpair_dealloc(rwpair *self)
{
_PyObject_GC_UNTRACK(self);
+ if (self->weakreflist != NULL)
+ PyObject_ClearWeakRefs((PyObject *)self);
Py_CLEAR(self->reader);
Py_CLEAR(self->writer);
Py_CLEAR(self->dict);