summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorian.mcgreer%sun.com <devnull@localhost>2002-03-04 21:06:10 +0000
committerian.mcgreer%sun.com <devnull@localhost>2002-03-04 21:06:10 +0000
commitb67ad60b7c5ed178ff43554ed8f5230e46aaed30 (patch)
tree92e7523742523bd74a81e2a887111d6251cb576a
parenta04ae3825577d39915ddaf435feb2291e0b5c74a (diff)
downloadnss-hg-b67ad60b7c5ed178ff43554ed8f5230e46aaed30.tar.gz
bug 125808, fix crash seen with Javi's db
-rw-r--r--security/nss/lib/pki/tdcache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/security/nss/lib/pki/tdcache.c b/security/nss/lib/pki/tdcache.c
index 4d80e8b76..d7a7b471a 100644
--- a/security/nss/lib/pki/tdcache.c
+++ b/security/nss/lib/pki/tdcache.c
@@ -729,6 +729,7 @@ add_cert_to_cache
return nssrv;
loser:
/* Remove any handles that have been created */
+ subjectList = NULL;
if (added >= 1) {
(void)remove_issuer_and_serial_entry(td->cache, cert);
}
@@ -741,6 +742,10 @@ loser:
if (added >= 4) {
(void)remove_email_entry(td->cache, cert, subjectList);
}
+ if (subjectList) {
+ nssHash_Remove(td->cache->subject, &cert->subject);
+ nssList_Destroy(subjectList);
+ }
if (arena) {
nssArena_Destroy(arena);
}