bpo-31061: fix crash in asyncio speedup module (GH-2966)

This commit is contained in:
Alexander Mohr 2017-08-01 23:31:07 -07:00 committed by INADA Naoki
parent 47320a652e
commit de34cbe9cd
4 changed files with 32 additions and 0 deletions

View file

@ -972,6 +972,8 @@ FutureObj_dealloc(PyObject *self)
}
}
PyObject_GC_UnTrack(self);
if (fut->fut_weakreflist != NULL) {
PyObject_ClearWeakRefs(self);
}
@ -1846,6 +1848,8 @@ TaskObj_dealloc(PyObject *self)
}
}
PyObject_GC_UnTrack(self);
if (task->task_weakreflist != NULL) {
PyObject_ClearWeakRefs(self);
}