Browse Source

alloc: fix memory leak in tests.

Rusty Russell 14 years ago
parent
commit
cae56e4dd3
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ccan/alloc/test/run.c

+ 2 - 0
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[])