Commit 91ccdc04 authored by Daiki Ueno's avatar Daiki Ueno

Bug 1366187, pk11wrap: catch the case where NSSToken is not set, r=kaie

parent f513e396
......@@ -765,7 +765,12 @@ find_certs_from_nickname(const char *nickname, void *wincx)
*delimit = ':';
} else {
slot = PK11_GetInternalKeySlot();
token = nssToken_AddRef(PK11Slot_GetNSSToken(slot));
token = PK11Slot_GetNSSToken(slot);
if (token) {
nssToken_AddRef(token);
} else {
PORT_SetError(SEC_ERROR_NO_TOKEN);
}
}
if (token) {
nssList *certList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment