X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ftal%2Ftest%2Frun.c;h=984865125deca6538ea531b714a077dce3a05b87;hb=8cf5b6208cad807228a69d695e6521122d4b71da;hp=3d3799c55492b989a59720d98423b7ccfbee1f9e;hpb=dfe59969500a0c4e3b82ce6e7f8227d1a6e7b178;p=ccan diff --git a/ccan/tal/test/run.c b/ccan/tal/test/run.c index 3d3799c5..98486512 100644 --- a/ccan/tal/test/run.c +++ b/ccan/tal/test/run.c @@ -7,7 +7,10 @@ int main(void) char *parent, *c[4], *p; int i, j; - plan_tests(12); + plan_tests(14); + + /* tal_free(NULL) works. */ + ok1(tal_free(NULL) == NULL); parent = tal(NULL, char); ok1(parent); @@ -33,7 +36,7 @@ int main(void) ok1(*c[3] == '1'); /* Free parent. */ - tal_free(parent); + ok1(tal_free(parent) == NULL); parent = tal(NULL, char); @@ -53,5 +56,6 @@ int main(void) } tal_free(parent); + tal_cleanup(); return exit_status(); }