common/param: don't keep around the temporary array off cmd.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2022-02-26 11:20:33 +10:30
parent 3218e5332f
commit 9bf2aa65cd

View File

@@ -313,7 +313,7 @@ const char *param_subcommand(struct command *cmd, const char *buffer,
bool param(struct command *cmd, const char *buffer,
const jsmntok_t tokens[], ...)
{
struct param *params = tal_arr(cmd, struct param, 0);
struct param *params = tal_arr(tmpctx, struct param, 0);
const char *name;
va_list ap;
bool allow_extra = false;