diff options
author | wtc%netscape.com <devnull@localhost> | 2002-04-09 21:31:43 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-04-09 21:31:43 +0000 |
commit | 9058b7d5007fef68f8563d693858c15a717fd11a (patch) | |
tree | 90822935f2c36e5216f2685687cb2be826a7f424 | |
parent | 24febe7e0aa9c0cb5dd9f2bd720f9f4f1fc8d0bc (diff) | |
download | nss-hg-9058b7d5007fef68f8563d693858c15a717fd11a.tar.gz |
Merged the fix for bug 135721 on the NSS_3_4_BRANCH.
-rw-r--r-- | security/nss/lib/ckfw/sessobj.c | 16 |
1 files 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; } /* |