From af645b38c8d347702f03922df86f62f94a5194e6 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 26 Aug 2019 18:15:22 +0930 Subject: [PATCH] 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 --- common/configdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/configdir.c b/common/configdir.c index 3088169c2..ee0d822cd 100644 --- a/common/configdir.c +++ b/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;