Skip to content

Commit

Permalink
Bug 212112: we don't need to lock td->cache->lock while calling
Browse files Browse the repository at this point in the history
STAN_ForceCERTCertificateUpdate.  This fixed a recursive deadlock.
r=mcgreer.
  • Loading branch information
wtc%netscape.com committed Jul 10, 2003
1 parent e5eb091 commit abe077c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions security/nss/lib/pki/tdcache.c
Expand Up @@ -488,11 +488,15 @@ nssTrustDomain_RemoveTokenCertsFromCache (
for (i=0; i<dtor.numCerts; i++) {
if (dtor.certs[i]->object.numInstances == 0) {
nssTrustDomain_RemoveCertFromCacheLOCKED(td, dtor.certs[i]);
} else {
STAN_ForceCERTCertificateUpdate(dtor.certs[i]);
dtor.certs[i] = NULL; /* skip this cert in the second for loop */
}
}
PZ_Unlock(td->cache->lock);
for (i=0; i<dtor.numCerts; i++) {
if (dtor.certs[i]) {
STAN_ForceCERTCertificateUpdate(dtor.certs[i]);
}
}
nss_ZFreeIf(dtor.certs);
return PR_SUCCESS;
}
Expand Down

0 comments on commit abe077c

Please sign in to comment.