options: don't leak memory when people override options.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-12-14 06:30:24 +10:30
committed by Christian Decker
parent 005f3826c9
commit b00525b8c8
3 changed files with 13 additions and 3 deletions

View File

@@ -523,7 +523,7 @@ void register_opts(struct lightningd *ld)
"Print this message.");
opt_register_arg("--port", opt_set_u16, opt_show_u16, &ld->portnum,
"Port to bind to (0 means don't listen)");
opt_register_arg("--bitcoin-datadir", opt_set_charp, NULL,
opt_register_arg("--bitcoin-datadir", opt_set_talstr, NULL,
&ld->topology->bitcoind->datadir,
"-datadir arg for bitcoin-cli");
opt_register_arg("--rgb", opt_set_rgb, NULL, ld,