From 9058b7d5007fef68f8563d693858c15a717fd11a Mon Sep 17 00:00:00 2001 From: "wtc%netscape.com" Date: Tue, 9 Apr 2002 21:31:43 +0000 Subject: Merged the fix for bug 135721 on the NSS_3_4_BRANCH. --- security/nss/lib/ckfw/sessobj.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/security/nss/lib/ckfw/sessobj.c b/security/nss/lib/ckfw/sessobj.c index 11de006ba..66555fe23 100644 --- a/security/nss/lib/ckfw/sessobj.c +++ b/security/nss/lib/ckfw/sessobj.c @@ -202,7 +202,7 @@ nss_ckmdSessionObject_GetAttributeSize CK_RV *pError ); -static const NSSItem * +static NSSCKFWItem nss_ckmdSessionObject_GetAttribute ( NSSCKMDObject *mdObject, @@ -582,7 +582,7 @@ nss_ckmdSessionObject_GetAttributeSize * nss_ckmdSessionObject_GetAttribute * */ -static const NSSItem * +static NSSCKFWItem nss_ckmdSessionObject_GetAttribute ( NSSCKMDObject *mdObject, @@ -597,17 +597,20 @@ nss_ckmdSessionObject_GetAttribute CK_RV *pError ) { + NSSCKFWItem item; nssCKMDSessionObject *obj; CK_ULONG i; + item.needsFreeing = PR_FALSE; + item.item = NULL; #ifdef NSSDEBUG if( (CK_RV *)NULL == pError ) { - return 0; + return item; } *pError = nss_ckmdSessionObject_verifyPointer(mdObject); if( CKR_OK != *pError ) { - return 0; + return item; } /* We could even check all the other arguments, for sanity. */ @@ -617,12 +620,13 @@ nss_ckmdSessionObject_GetAttribute for( i = 0; i < obj->n; i++ ) { if( attribute == obj->types[i] ) { - return &obj->attributes[i]; + item.item = &obj->attributes[i]; + return item; } } *pError = CKR_ATTRIBUTE_TYPE_INVALID; - return 0; + return item; } /* -- cgit v1.2.1