diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index 01a7ad057b4..aef5d710c10 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/collectionsmodule.c @@ -224,9 +224,9 @@ deque_popleft(dequeobject *deque, PyObject *unused) deque->leftindex = CENTER + 1; deque->rightindex = CENTER; } else { + assert(deque->leftblock != NULL); assert(deque->leftblock != deque->rightblock); prevblock = deque->leftblock->rightlink; - assert(deque->leftblock != NULL); PyMem_Free(deque->leftblock); assert(prevblock != NULL); prevblock->leftlink = NULL;