summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsecurity/nss/lib/libpkix/pkix/util/pkix_tools.c2
-rwxr-xr-xsecurity/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c15
-rwxr-xr-xsecurity/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c14
-rwxr-xr-xsecurity/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h3
4 files changed, 17 insertions, 17 deletions
diff --git a/security/nss/lib/libpkix/pkix/util/pkix_tools.c b/security/nss/lib/libpkix/pkix/util/pkix_tools.c
index f72d252b9..acd070465 100755
--- a/security/nss/lib/libpkix/pkix/util/pkix_tools.c
+++ b/security/nss/lib/libpkix/pkix/util/pkix_tools.c
@@ -834,7 +834,6 @@ pkix_CacheCertChain_Add(
PKIX_List *cachedValues = NULL;
PKIX_List *cachedKeys = NULL;
PKIX_Error *cachedCertChainError = NULL;
- PKIX_PL_Date *date = NULL;
PKIX_PL_Date *cacheValidUntilDate = NULL;
PKIX_ENTER(BUILD, "pkix_CacheCertChain_Add");
@@ -894,7 +893,6 @@ cleanup:
PKIX_DECREF(cachedKeys);
PKIX_DECREF(cachedCertChainError);
PKIX_DECREF(cacheValidUntilDate);
- PKIX_DECREF(date);
PKIX_RETURN(BUILD);
}
diff --git a/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c b/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c
index d9fe830ae..4a1e3914f 100755
--- a/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c
+++ b/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c
@@ -304,7 +304,8 @@ PKIX_PL_HashTable_Remove(
void *plContext)
{
PKIX_PL_Mutex *lockedMutex = NULL;
- PKIX_PL_Object *result = NULL;
+ PKIX_PL_Object *origKey = NULL;
+ PKIX_PL_Object *value = NULL;
PKIX_UInt32 hashCode;
PKIX_PL_EqualsCallback keyComp;
@@ -335,15 +336,15 @@ PKIX_PL_HashTable_Remove(
(void *)key,
hashCode,
keyComp,
- (void **)&result,
+ (void **)&origKey,
+ (void **)&value,
plContext),
PKIX_PRIMHASHTABLEREMOVEFAILED);
PKIX_MUTEX_UNLOCK(ht->tableLock);
- if (result != NULL) {
- PKIX_DECREF(result);
- }
+ PKIX_DECREF(origKey);
+ PKIX_DECREF(value);
/*
* we don't call PKIX_PL_InvalidateCache here b/c we have
@@ -405,9 +406,7 @@ PKIX_PL_HashTable_Lookup(
PKIX_MUTEX_UNLOCK(ht->tableLock);
- if (result != NULL) {
- PKIX_INCREF(result);
- }
+ PKIX_INCREF(result);
*pResult = result;
cleanup:
diff --git a/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c b/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c
index e5f7f9d3f..4386c81af 100755
--- a/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c
+++ b/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c
@@ -302,7 +302,8 @@ pkix_pl_PrimHashTable_Remove(
void *key,
PKIX_UInt32 hashCode,
PKIX_PL_EqualsCallback keyComp,
- void **pResult,
+ void **pKey,
+ void **pValue,
void *plContext)
{
pkix_pl_HT_Elem *element = NULL;
@@ -310,7 +311,10 @@ pkix_pl_PrimHashTable_Remove(
PKIX_Boolean compResult;
PKIX_ENTER(HASHTABLE, "pkix_pl_PrimHashTable_Remove");
- PKIX_NULLCHECK_THREE(ht, key, pResult);
+ PKIX_NULLCHECK_FOUR(ht, key, pKey, pValue);
+
+ *pKey = NULL;
+ *pValue = NULL;
for (element = ht->buckets[hashCode%ht->size], prior = element;
(element != NULL);
@@ -344,7 +348,8 @@ pkix_pl_PrimHashTable_Remove(
} else {
ht->buckets[hashCode%ht->size] = element->next;
}
- *pResult = element->value;
+ *pKey = element->key;
+ *pValue = element->value;
element->key = NULL;
element->value = NULL;
element->next = NULL;
@@ -353,9 +358,6 @@ pkix_pl_PrimHashTable_Remove(
}
}
- /* if we've reached here, specified key doesn't exist in hashtable */
- *pResult = NULL;
-
cleanup:
PKIX_RETURN(HASHTABLE);
diff --git a/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h b/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h
index 859b75a51..5fdf258ac 100755
--- a/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h
+++ b/security/nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h
@@ -95,7 +95,8 @@ pkix_pl_PrimHashTable_Remove(
void *key,
PKIX_UInt32 hashCode,
PKIX_PL_EqualsCallback keyComp,
- void **pResult,
+ void **pKey,
+ void **pValue,
void *plContext);
PKIX_Error *