[Python-checkins] r52162 - python/branches/release24-maint/Modules/collectionsmodule.c
andrew.kuchling
python-checkins at python.org
Thu Oct 5 19:22:15 CEST 2006
Author: andrew.kuchling
Date: Thu Oct 5 19:22:15 2006
New Revision: 52162
Modified:
python/branches/release24-maint/Modules/collectionsmodule.c
Log:
[Backport r51224 | neal.norwitz]
Move the assert which checks for a NULL pointer first.
Klocwork #274.
Modified: python/branches/release24-maint/Modules/collectionsmodule.c
==============================================================================
--- python/branches/release24-maint/Modules/collectionsmodule.c (original)
+++ python/branches/release24-maint/Modules/collectionsmodule.c Thu Oct 5 19:22:15 2006
@@ -225,9 +225,9 @@
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;
More information about the Python-checkins
mailing list