p12ctxt->slot = (slot) ? slot : PK11_GetInternalSlot();
p12ctxt->slot = (slot) ? PK11_ReferenceSlot(slot) : PK11_GetInternalSlot();
SEC_PKCS12CreateExportContext(SECKEYGetPasswordKey pwfn, void *pwfnarg,  			      PK11SlotInfo *slot, void *wincx){    PRArenaPool *arena = NULL;    SEC_PKCS12ExportContext *p12ctxt = NULL;    /* allocate the arena and create the context */    arena = PORT_NewArena(4096);    if(!arena) {	PORT_SetError(SEC_ERROR_NO_MEMORY);	return NULL;    }    p12ctxt = (SEC_PKCS12ExportContext *)PORT_ArenaZAlloc(arena, 					sizeof(SEC_PKCS12ExportContext));    if(!p12ctxt) {	PORT_SetError(SEC_ERROR_NO_MEMORY);	goto loser;    }    /* password callback for key retrieval */    p12ctxt->pwfn = pwfn;    p12ctxt->pwfnarg = pwfnarg;    p12ctxt->integrityEnabled = PR_FALSE;    p12ctxt->arena = arena;    p12ctxt->wincx = wincx;    p12ctxt->slot = (slot) ? slot : PK11_GetInternalSlot();    return p12ctxt;loser:    if(arena) {	PORT_FreeArena(arena, PR_TRUE);    }    return NULL;}