cli/lightning-cli: free eveything on exit.

It's not required, but it means valgrind won't complain about leaks.

Suggested-by: @m-schmoock
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-06-04 03:56:25 +09:30
parent 628b65fb40
commit e902d9af56
2 changed files with 11 additions and 0 deletions

View File

@@ -604,6 +604,8 @@ int main(int argc, char *argv[])
tal_free(rpc_filename);
tal_free(ctx);
opt_free_table();
free(resp);
free(toks);
return 0;
}
@@ -618,5 +620,7 @@ int main(int argc, char *argv[])
tal_free(rpc_filename);
tal_free(ctx);
opt_free_table();
free(resp);
free(toks);
return 1;
}