Skip to content

Commit

Permalink
Bugzilla bug 228618: fixed an incorrect use of realloc. Fixed an unused
Browse files Browse the repository at this point in the history
variable compiler warning.  r=jpierre.
  • Loading branch information
wchang0222%aol.com committed Dec 16, 2003
1 parent 82454b4 commit 420dc3e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions security/nss/lib/pki/pkibase.c
Expand Up @@ -217,12 +217,11 @@ nssPKIObject_RemoveInstanceForToken (
}
}
if (--object->numInstances > 0) {
object->instances = nss_ZREALLOCARRAY(object->instances,
nssCryptokiObject **instances = nss_ZREALLOCARRAY(object->instances,
nssCryptokiObject *,
object->numInstances);
if (!object->instances) {
PZ_Unlock(object->lock);
return PR_FAILURE;
if (instances) {
object->instances = instances;
}
} else {
nss_ZFreeIf(object->instances);
Expand All @@ -244,10 +243,12 @@ nssPKIObject_DeleteStoredObject (
{
PRUint32 i, numNotDestroyed;
PRStatus status = PR_SUCCESS;
#ifndef NSS_3_4_CODE
NSSTrustDomain *td = object->trustDomain;
NSSCallback *pwcb = uhh ? /* is this optional? */
uhh :
nssTrustDomain_GetDefaultCallback(td, NULL);
#endif
numNotDestroyed = 0;
PZ_Lock(object->lock);
for (i=0; i<object->numInstances; i++) {
Expand Down

0 comments on commit 420dc3e

Please sign in to comment.