ah, first bug. init the token last when creating a slot.
git-svn-id: svn://10.0.0.236/trunk@102890 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
4a2c156d61
commit
96afac4792
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#ifdef DEBUG
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: slot.c,v $ $Revision: 1.1 $ $Date: 2001-09-13 22:06:10 $ $Name: not supported by cvs2svn $";
|
||||
static const char CVS_ID[] = "@(#) $RCSfile: slot.c,v $ $Revision: 1.2 $ $Date: 2001-09-13 22:14:22 $ $Name: not supported by cvs2svn $";
|
||||
#endif /* DEBUG */
|
||||
|
||||
#ifndef DEV_H
|
||||
@ -112,10 +112,6 @@ NSSSlot_Create
|
||||
goto loser;
|
||||
}
|
||||
}
|
||||
/* Initialize the token if present. */
|
||||
if (slotInfo.flags & CKF_TOKEN_PRESENT) {
|
||||
token = NSSToken_Create(arena, slotID, rvSlot);
|
||||
}
|
||||
if (!arenaOpt) {
|
||||
/* Avoid confusion now - only set the slot's arena to a non-NULL value
|
||||
* if a new arena is created. Otherwise, depend on the caller (having
|
||||
@ -128,10 +124,12 @@ NSSSlot_Create
|
||||
rvSlot->module = parent;
|
||||
rvSlot->name = slotName;
|
||||
rvSlot->ckFlags = slotInfo.flags;
|
||||
/* Get the token for the slot */
|
||||
token = NSSToken_Create(arenaOpt, slotID, rvSlot);
|
||||
if (!token) {
|
||||
goto loser;
|
||||
/* Initialize the token if present. */
|
||||
if (slotInfo.flags & CKF_TOKEN_PRESENT) {
|
||||
token = NSSToken_Create(arena, slotID, rvSlot);
|
||||
if (!token) {
|
||||
goto loser;
|
||||
}
|
||||
}
|
||||
rvSlot->token = token;
|
||||
#ifdef arena_mark_bug_fixed
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user