Browse Source

common: fix missing HOME case, when we override --lightning-dir.

It fails because option.c tal_free's the old value, which must be
a tal ptr.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
pull/2938/head
Rusty Russell 5 years ago
parent
commit
af645b38c8
  1. 2
      common/configdir.c

2
common/configdir.c

@ -16,7 +16,7 @@ char *default_configdir(const tal_t *ctx)
char *path;
const char *env = getenv("HOME");
if (!env)
return ".";
return tal_strdup(ctx, ".");
path = path_join(ctx, env, ".lightning");
return path;

Loading…
Cancel
Save