decodeItem = CERT_DecodeAVAValue(&ava->value);
SECItem *decodeItem = CERT_DecodeAVAValue(&ava->value);
CERT_GetNameElement(PRArenaPool *arena, CERTName *name, int wantedTag){    CERTRDN** rdns;    CERTRDN *rdn;    CERTAVA** avas;    CERTAVA* ava;    char *buf = 0;    int tag;    SECItem *decodeItem = NULL;        rdns = name->rdns;    while ((rdn = *rdns++) != 0) {	avas = rdn->avas;	while ((ava = *avas++) != 0) {	    tag = CERT_GetAVATag(ava);	    if ( tag == wantedTag ) {		decodeItem = CERT_DecodeAVAValue(&ava->value);		if(!decodeItem) {		    return NULL;		}		if (arena) {		    buf = (char *)PORT_ArenaZAlloc(arena,decodeItem->len + 1);		} else {		    buf = (char *)PORT_ZAlloc(decodeItem->len + 1);		}		if ( buf ) {		    PORT_Memcpy(buf, decodeItem->data, decodeItem->len);		    buf[decodeItem->len] = 0;		}		SECITEM_FreeItem(decodeItem, PR_TRUE);		goto done;	    }	}    }      done:    return buf;}