void freeBlocktree(block_t * bp) { block_t *child; block_t *next; for (child = bp->children.first; child; child = next) { next = child->next; freeBlocktree(child); } freeBlock(bp); }
/* cleanup: * We need to cleanup objects created in initGraphAttrs * and all blocks. All graph objects are components of the * initial derived graph and will be freed when it is closed. */ static void cleanup(block_t * root, circ_state * sp) { freeBlocktree(root); }