Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
@ -597,6 +597,8 @@ static struct command_result *command_exec(struct json_connection *jcon,
if (res == &pending)
assert(cmd->pending);
/* The command might outlive the connection. */
if (jcon)
list_for_each(&jcon->commands, cmd, list)