mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
lightningd: fix double-specified args.
We need to make sure the arg is a tal object, as we'll free it next time. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
6139fee31d
commit
666e1b320f
@@ -335,6 +335,8 @@ int main(int argc, char *argv[])
|
||||
printf("%.*s\n",
|
||||
json_tok_len(result),
|
||||
json_tok_contents(resp, result));
|
||||
tal_free(lightning_dir);
|
||||
tal_free(rpc_filename);
|
||||
tal_free(ctx);
|
||||
opt_free_table();
|
||||
return 0;
|
||||
@@ -342,6 +344,8 @@ int main(int argc, char *argv[])
|
||||
|
||||
printf("%.*s\n",
|
||||
json_tok_len(error), json_tok_contents(resp, error));
|
||||
tal_free(lightning_dir);
|
||||
tal_free(rpc_filename);
|
||||
tal_free(ctx);
|
||||
opt_free_table();
|
||||
return 1;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
char *opt_set_talstr(const char *arg, char **p)
|
||||
{
|
||||
tal_free(*p);
|
||||
return opt_set_charp(arg, p);
|
||||
return opt_set_charp(tal_strdup(NULL, arg), p);
|
||||
}
|
||||
|
||||
static char *default_configdir(const tal_t *ctx)
|
||||
|
||||
Reference in New Issue
Block a user