snapshot v2/p5; destroy

This commit is contained in:
Gregory Burd 2024-03-23 11:53:13 -04:00
parent cc28920ada
commit 81365cdff4

View file

@ -836,6 +836,7 @@
} \
if (SKIPLIST_MAX_HEIGHT == 1) \
free(path); \
/* if we didn't preserve any nodes we can free this one */ \
if (np == 0) \
free_node_blk; \
\
@ -888,6 +889,12 @@
node = next; \
} while (node != NULL); \
\
node = slist->slh_pres; \
while (node) { \
next = node->field.sle.next[0]; \
prefix##skip_free_node_##decl(node); \
} \
\
free(slist->slh_head); \
free(slist->slh_tail); \
return 0; \