newcrls = (CERTSignedCrl**)PORT_Realloc(cache->crls, (cache->ncrls+1)*sizeof(CERTSignedCrl*)); if (!newcrls) {
*added = PR_FALSE;  for (i=0;i<cache->ncrls;i++) { CachedCrl* existing = NULL; SECStatus rv = SECSuccess; PRBool dupe = PR_FALSE, updated = PR_FALSE; if (!cache->crls) { PORT_Assert(0); return SECFailure; } existing = cache->crls[i]; if (!existing) { PORT_Assert(0); return SECFailure; } rv = CachedCrl_Compare(existing, newcrl, &dupe, &updated); if (SECSuccess != rv) { PORT_Assert(0); PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return SECFailure; } if (PR_TRUE == dupe) {  PORT_SetError(SEC_ERROR_CRL_ALREADY_EXISTS); return SECSuccess; } if (PR_TRUE == updated) {  if (SECSuccess != DPCache_RemoveCRL(cache, i)) { PORT_Assert(0); PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); return PR_FALSE; } } }  newcrls = (CachedCrl**)PORT_Realloc(cache->crls, (cache->ncrls+1)*sizeof(CachedCrl*)); if (!newcrls) {
SECStatus DPCache_AddCRL(CRLDPCache* cache, CERTSignedCrl* crl){    CERTSignedCrl** newcrls = NULL;    PORT_Assert(cache);    PORT_Assert(crl);    if (!cache || !crl) {        return SECFailure;    }    newcrls = (CERTSignedCrl**)PORT_Realloc(cache->crls,        (cache->ncrls+1)*sizeof(CERTSignedCrl*));    if (!newcrls) {        return SECFailure;    }    cache->crls = newcrls;    cache->ncrls++;    cache->crls[cache->ncrls-1] = crl;    return SECSuccess;}