if ( certDBKey != NULL ) { SECITEM_FreeItem(certDBKey, PR_TRUE); }
RemoveCertFromSPKDigestTableForAlg(CERTCertDBHandle *handle,				   CERTCertificate *cert, SECOidTag digestAlg){    SECStatus rv = SECSuccess;    SECItem *certDBKey = NULL;    char *index = NULL;    PLHashTable *table;    /* Expect to only be called if there is a table to work with. */    PORT_Assert(handle->spkDigestInfo != NULL);    table = SPK_DIGEST_TABLE(handle);    PORT_Assert(table != NULL);    index = spkDigestIndexFromCert(cert, digestAlg);    if ( index == NULL ) {	rv = SECFailure;	goto done;    }    /*     * Get hold of this value so we can free it after doing the remove.     */    certDBKey = PL_HashTableLookup(table, index);    if ( certDBKey == NULL ) {	/* not found means nothing to remove, which is fine */	goto done;    }    if ( PL_HashTableRemove(table, index) != PR_TRUE ) {	/* This should not actually happen, since we already did a lookup. */	PORT_Assert(0);	rv = SECFailure;    }done:    if ( certDBKey != NULL ) {	SECITEM_FreeItem(certDBKey, PR_TRUE);    }    if ( index != NULL ) {	PORT_Free(index);    }    return(rv);}