From: Jeremy Kerr Date: Mon, 20 May 2013 02:28:23 +0000 (+0800) Subject: test/parser: cleanup parser allocations on exit X-Git-Tag: v1.0.0~604 X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=7048bb4f8667dc0ce7cf46e96a8db07622d9a39f;hp=7048bb4f8667dc0ce7cf46e96a8db07622d9a39f test/parser: cleanup parser allocations on exit We should talloc_free the parser list once we're done, enabling valgrind's leak check. Before: [jk@pablo parser]$ valgrind ./test-null ... ==9330== HEAP SUMMARY: ==9330== in use at exit: 288 bytes in 3 blocks ==9330== total heap usage: 11 allocs, 8 frees, 1,177 bytes allocated After: [jk@pablo parser]$ valgrind ./test-null ... ==9940== HEAP SUMMARY: ==9940== in use at exit: 0 bytes in 0 blocks ==9940== total heap usage: 11 allocs, 11 frees, 1,177 bytes allocated ==9940== ==9940== All heap blocks were freed -- no leaks are possible Signed-off-by: Jeremy Kerr ---