diff --git a/Objects/structseq.c b/Objects/structseq.c index cded877300d9e9..092e1634656a31 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -553,6 +553,9 @@ _PyStructSequence_FiniType(PyTypeObject *type) // Undo Py_INCREF(type) of _PyStructSequence_InitType(). // Don't use Py_DECREF(): static type must not be deallocated Py_SET_REFCNT(type, 0); +#ifdef Py_REF_DEBUG + _Py_RefTotal--; +#endif // Make sure that _PyStructSequence_InitType() will initialize // the type again