summaryrefslogtreecommitdiff
path: root/security/nss/lib/softoken/legacydb/lginit.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/lib/softoken/legacydb/lginit.c')
-rw-r--r--security/nss/lib/softoken/legacydb/lginit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/security/nss/lib/softoken/legacydb/lginit.c b/security/nss/lib/softoken/legacydb/lginit.c
index d3b4ff32fe..3cd4d8ea03 100644
--- a/security/nss/lib/softoken/legacydb/lginit.c
+++ b/security/nss/lib/softoken/legacydb/lginit.c
@@ -515,6 +515,7 @@ lg_init(SDB **pSdb, int flags, NSSLOWCERTCertDBHandle *certdbPtr,
lgdb_p->hashTable = PL_NewHashTable(64, lg_HashNumber, PL_CompareValues,
SECITEM_HashCompare, NULL, 0);
if (lgdb_p->hashTable == NULL) {
+ PR_DestroyLock(lgdb_p->dbLock);
goto loser;
}
@@ -548,12 +549,6 @@ loser:
PORT_Free(sdb);
}
if (lgdb_p) {
- if (lgdb_p->dbLock) {
- PR_DestroyLock(lgdb_p->dbLock);
- }
- if (lgdb_p->hashTable) {
- PL_HashTableDestroy(lgdb_p->hashTable);
- }
PORT_Free(lgdb_p);
}
return error;