]> git.ozlabs.org Git - ccan/blobdiff - ccan/alloc/test/run.c
alloc: fix memory leak in tests.
[ccan] / ccan / alloc / test / run.c
index d5b40c8c3708d13a1c138f902d596ba1d8f40691..7c8fce3d76fd0f2202d4a136b1ce89712993c4cb 100644 (file)
@@ -160,6 +160,8 @@ static void test(unsigned int pool_size)
        ok1(alloc_size(mem, pool_size, p[0]) < pool_size);
        alloc_free(mem, pool_size, p[0]);
        ok1(alloc_check(mem, pool_size));
+
+       free(mem);
 }
 
 int main(int argc, char *argv[])