зеркало из https://github.com/mozilla/pjs.git
ah, first bug. init the token last when creating a slot.
This commit is contained in:
Родитель
e79146d929
Коммит
9fc3829457
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче