mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
[NSS] Simplify error handling in get_token_objects_for_cache.
This commit is contained in:
parent
9d8a3f0848
commit
ecb18ddf57
1 changed files with 5 additions and 2 deletions
|
|
@ -584,8 +584,11 @@ get_token_objects_for_cache(
|
|||
} else {
|
||||
PRUint32 j;
|
||||
for (j = 0; j < i; j++) {
|
||||
/* sigh */
|
||||
nssToken_AddRef(cache->objects[objectType][j]->object->token);
|
||||
/* Objects that were successfully added to the cache do not own a
|
||||
* token reference (they share a reference with the cache itself).
|
||||
* Nulling out the pointer here prevents the token's refcount
|
||||
* from being decremented in nssCryptokiObject_Destroy */
|
||||
cache->objects[objectType][j]->object->token = NULL;
|
||||
nssArena_Destroy(cache->objects[objectType][j]->arena);
|
||||
}
|
||||
nss_ZFreeIf(cache->objects[objectType]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue