summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-09-30 02:48:51 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-09-30 02:48:51 (GMT)
commitc44eb73473f31dfde1e8cb6ba485a309e3b0757e (patch)
treec54b284e6a58697779b80b01ff403222c42a6b9d /Modules
parentc2cfa8ddd8dbad8e09b3f3cec56b0727c9370af1 (diff)
parentbbd0a323aeb1222d216fa10a9e1d9c91945ad1e6 (diff)
downloadcpython-c44eb73473f31dfde1e8cb6ba485a309e3b0757e.zip
cpython-c44eb73473f31dfde1e8cb6ba485a309e3b0757e.tar.gz
cpython-c44eb73473f31dfde1e8cb6ba485a309e3b0757e.tar.bz2
merge 3.3 (#22517)
Diffstat (limited to 'Modules')
-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 4c0262e..302db0a 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -2297,6 +2297,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);