free(domain);
static void kill_domain(struct domain *domain) {    struct host *host;    assert(domain != NULL);    assert(domain->host != NULL);    host = domain->host;    while (domain->num_clients > 0)        kill_client(domain->clients_head->prev);    host->num_domains--;    if (host->num_domains == 0) {        assert(domain->next == domain);        assert(domain->prev == domain);        host->domains_head = NULL;    } else {        if (domain == host->domains_head)            host->domains_head = domain->next;        domain->next->prev = domain->prev;        domain->prev->next = domain->next;    }}