static void clearstanza(STANZA *s)
{
    PAIR *pp = s->pairs;
    int i = s->numpairs;
    int start = s->start;

    for ( ; --i >= 0; pp++) {
        OPENSSL_free(pp->key);
        OPENSSL_free(pp->value);
    }
    memset(s, 0, sizeof(*s));
    s->start = start;
}