summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-03-31 02:59:48 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-03-31 02:59:48 (GMT)
commit57b17ad6aeb821262aef41ffd31d1302f18e79c5 (patch)
treea3af9d97f1915ec13e0bb4d71d19a08fd2c6db5a
parent4c5be0ce09326d294ed252389fc8201fcd4390ff (diff)
downloadcpython-57b17ad6aeb821262aef41ffd31d1302f18e79c5.zip
cpython-57b17ad6aeb821262aef41ffd31d1302f18e79c5.tar.gz
cpython-57b17ad6aeb821262aef41ffd31d1302f18e79c5.tar.bz2
Add one more assert that indirectly interlocking conditions are consistent
with each other.
-rw-r--r--Objects/obmalloc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c
index 019aa5b..cf2b477 100644
--- a/Objects/obmalloc.c
+++ b/Objects/obmalloc.c
@@ -686,6 +686,7 @@ _PyMalloc_Free(void *p)
* was full and is in no list -- it's not in the freeblocks
* list in any case).
*/
+ assert(pool->ref.count > 0); /* else it was empty */
*(block **)p = lastfree = pool->freeblock;
pool->freeblock = (block *)p;
if (lastfree) {