From: Rusty Russell Date: Tue, 4 Oct 2011 01:37:45 +0000 (+1030) Subject: alloc: fix memory leak in tests. X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=cae56e4dd39f6b3c251eec3d6beac6135881848f alloc: fix memory leak in tests. --- diff --git a/ccan/alloc/test/run.c b/ccan/alloc/test/run.c index d5b40c8c..7c8fce3d 100644 --- a/ccan/alloc/test/run.c +++ b/ccan/alloc/test/run.c @@ -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[])