diff --git a/src/listpack.c b/src/listpack.c index bfa364f98..abe2142de 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -2224,6 +2224,7 @@ int listpackTest(int argc, char *argv[], int flags) { index++; } } + lpFree(lp); } TEST("lpNextRandom corner cases") { @@ -2272,6 +2273,7 @@ int listpackTest(int argc, char *argv[], int flags) { p = lpNextRandom(lp, p, &i, remaining, 0); assert(p == p0 || p == p1 || p == p2 || p == NULL); } + lpFree(lp); } TEST("Random pair with one element") {