mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
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>
This commit is contained in:
parent
2f5f364e17
commit
af645b38c8
@ -16,7 +16,7 @@ char *default_configdir(const tal_t *ctx)
|
|||||||
char *path;
|
char *path;
|
||||||
const char *env = getenv("HOME");
|
const char *env = getenv("HOME");
|
||||||
if (!env)
|
if (!env)
|
||||||
return ".";
|
return tal_strdup(ctx, ".");
|
||||||
|
|
||||||
path = path_join(ctx, env, ".lightning");
|
path = path_join(ctx, env, ".lightning");
|
||||||
return path;
|
return path;
|
||||||
|
Loading…
Reference in New Issue
Block a user