snapshot v2/p5; destroy
This commit is contained in:
parent
cc28920ada
commit
81365cdff4
1 changed files with 7 additions and 0 deletions
|
@ -836,6 +836,7 @@
|
||||||
} \
|
} \
|
||||||
if (SKIPLIST_MAX_HEIGHT == 1) \
|
if (SKIPLIST_MAX_HEIGHT == 1) \
|
||||||
free(path); \
|
free(path); \
|
||||||
|
/* if we didn't preserve any nodes we can free this one */ \
|
||||||
if (np == 0) \
|
if (np == 0) \
|
||||||
free_node_blk; \
|
free_node_blk; \
|
||||||
\
|
\
|
||||||
|
@ -888,6 +889,12 @@
|
||||||
node = next; \
|
node = next; \
|
||||||
} while (node != NULL); \
|
} 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_head); \
|
||||||
free(slist->slh_tail); \
|
free(slist->slh_tail); \
|
||||||
return 0; \
|
return 0; \
|
||||||
|
|
Loading…
Reference in a new issue