]> granicus.if.org Git - python/commitdiff
Add one more assert that indirectly interlocking conditions are consistent
authorTim Peters <tim.peters@gmail.com>
Sun, 31 Mar 2002 02:59:48 +0000 (02:59 +0000)
committerTim Peters <tim.peters@gmail.com>
Sun, 31 Mar 2002 02:59:48 +0000 (02:59 +0000)
with each other.

Objects/obmalloc.c

index 019aa5bf214005b99d75de6401e1d2af2e020eb7..cf2b477d1c4adf916dc782b239e216116d7901ce 100644 (file)
@@ -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) {