calling "skiplist test" and then "skiplist debug",
there was a crash due to a freed pointer.
Agreed to remove static pointer (see PR #7474).
Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
static int randomsLeft;
static int randomBits;
-static struct skiplist *skiplist_last_created; /* debugging hack */
#if 1
#define CHECKLAST(sl) \
if (del)
new->del = del;
- skiplist_last_created = new; /* debug */
-
return new;
}
int i;
if (!l)
- l = skiplist_last_created;
+ return;
+
vty_out(vty, "Skiplist %p has max level %d\n", l, l->level);
for (i = l->level; i >= 0; --i)
vty_out(vty, " @%d: %ld\n", i,