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