qmerge_free (struct qmerge **x)
{
    struct qmerge *qm = *x;

    *x = 0;
    if (!qm || !qm->active)
        return;

    qm->active--;
    if (!qm->active)
    {
        qmerge_key_free (&qm->key);
        dns_transmit_free (&qm->dt);
    }
}
qmerge_free (struct qmerge **x)
{
    struct qmerge *qm = *x;

    *x = 0;
    if (!qm || !qm->active)
        return;

    qm->active--;
    if (!qm->active)
    {
        qmerge_key_free (&qm->key);
        dns_transmit_free (&qm->dt);
    }
}