alloc: fix memory leak in tests.
authorRusty Russell <rusty@rustcorp.com.au>
Tue, 4 Oct 2011 01:37:45 +0000 (12:07 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Tue, 4 Oct 2011 01:37:45 +0000 (12:07 +1030)
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[])