if (arenaOpt) {
if (alloced && arenaOpt) {
nssCKObject_GetAttributes(  CK_OBJECT_HANDLE object,  CK_ATTRIBUTE_PTR obj_template,  CK_ULONG count,  NSSArena *arenaOpt,  nssSession *session,  NSSSlot *slot){   nssArenaMark *mark;   CK_SESSION_HANDLE hSession;   CK_ULONG i;   CK_RV ckrv;   PRStatus nssrv;   hSession = session->handle;    if (arenaOpt) {	mark = nssArena_Mark(arenaOpt);	if (!mark) {	    goto loser;	}   }   /* Get the storage size needed for each attribute */   nssSession_EnterMonitor(session);   ckrv = CKAPI(slot)->C_GetAttributeValue(hSession,                                           object, obj_template, count);   if (ckrv != CKR_OK) {	nssSession_ExitMonitor(session);	/* set an error here */	goto loser;   }   /* Allocate memory for each attribute. */   for (i=0; i<count; i++) {	obj_template[i].pValue = nss_ZAlloc(arenaOpt, 	                                    obj_template[i].ulValueLen);	if (!obj_template[i].pValue) {	    nssSession_ExitMonitor(session);	    goto loser;	}   }   /* Obtain the actual attribute values. */   ckrv = CKAPI(slot)->C_GetAttributeValue(hSession,                                           object, obj_template, count);   nssSession_ExitMonitor(session);   if (ckrv != CKR_OK) {	/* set an error here */	goto loser;   }   if (arenaOpt) {	nssrv = nssArena_Unmark(arenaOpt, mark);	if (nssrv != PR_SUCCESS) {	    goto loser;	}   }   return PR_SUCCESS;loser:   if (arenaOpt) {	/* release all arena memory allocated before the failure. */	(void)nssArena_Release(arenaOpt, mark);   } else {	CK_ULONG j;	/* free each heap object that was allocated before the failure. */	for (j=0; j<i; j++) {	    nss_ZFreeIf(obj_template[j].pValue);	}   }   return PR_FAILURE;}