diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 9e2b9445794..eaa490e320d 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -208,10 +208,10 @@ static int numfree = 0; void PyDict_Fini(void) { - PyListObject *op; + PyDictObject *op; while (numfree) { - op = free_list[numfree--]; + op = free_list[--numfree]; assert(PyDict_CheckExact(op)); PyObject_GC_Del(op); } diff --git a/Objects/listobject.c b/Objects/listobject.c index df7a405f1f4..d6a99b1bfb4 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -92,8 +92,7 @@ PyList_Fini(void) PyListObject *op; while (numfree) { - numfree--; - op = free_list[numfree]; + op = free_list[--numfree]; assert(PyList_CheckExact(op)); PyObject_GC_Del(op); }