if (instance->label) { if (!object->instances[i]->label || !nssUTF8_Equal(instance->label, object->instances[i]->label, NULL)) {  nss_ZFreeIf(object->instances[i]->label); object->instances[i]->label = instance->label; instance->label = NULL; } } else if (object->instances[i]->label) {  nss_ZFreeIf(object->instances[i]->label); object->instances[i]->label = NULL; }
nssPKIObject_AddInstance(  nssPKIObject *object,  nssCryptokiObject *instance){    PZ_Lock(object->lock);    if (object->numInstances == 0) {	object->instances = nss_ZNEWARRAY(object->arena,	                                  nssCryptokiObject *,	                                  object->numInstances + 1);    } else {	PRUint32 i;	for (i=0; i<object->numInstances; i++) {	    if (nssCryptokiObject_Equal(object->instances[i], instance)) {		PZ_Unlock(object->lock);		nssCryptokiObject_Destroy(instance);		return PR_SUCCESS;	    }	}	object->instances = nss_ZREALLOCARRAY(object->instances,	                                      nssCryptokiObject *,	                                      object->numInstances + 1);    }    if (!object->instances) {	PZ_Unlock(object->lock);	return PR_FAILURE;    }    object->instances[object->numInstances++] = instance;    PZ_Unlock(object->lock);    return PR_SUCCESS;}