diff --git a/security/nss/lib/dev/slot.c b/security/nss/lib/dev/slot.c index 760980f59fc9..0fd63675b2a7 100644 --- a/security/nss/lib/dev/slot.c +++ b/security/nss/lib/dev/slot.c @@ -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: $"; +static const char CVS_ID[] = "@(#) $RCSfile: slot.c,v $ $Revision: 1.2 $ $Date: 2001/09/13 22:14:22 $ $Name: $"; #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