mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 14:54:26 +01:00
lightningd, libplugins: allocate opt strings from tmpctx, not NULL.
Previously, if these failed we always exited; once we have dymamic configs this would be a (tiny) memory leak, so use tmpctx. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -30,7 +30,7 @@ char *funding_option(const char *arg, enum funder_opt *opt)
|
||||
else if (streq(arg, "fixed"))
|
||||
*opt = FIXED;
|
||||
else
|
||||
return tal_fmt(NULL, "'%s' is not a valid option"
|
||||
return tal_fmt(tmpctx, "'%s' is not a valid option"
|
||||
" (match, available, fixed)",
|
||||
arg);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user