mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
[NSS] Improve locking in nssPKIObject_GetInstances.
This commit is contained in:
parent
fd4a224d1d
commit
be9a6ed2ac
1 changed files with 2 additions and 1 deletions
|
|
@ -333,10 +333,11 @@ nssPKIObject_GetInstances(
|
||||||
{
|
{
|
||||||
nssCryptokiObject **instances = NULL;
|
nssCryptokiObject **instances = NULL;
|
||||||
PRUint32 i;
|
PRUint32 i;
|
||||||
|
nssPKIObject_Lock(object);
|
||||||
if (object->numInstances == 0) {
|
if (object->numInstances == 0) {
|
||||||
|
nssPKIObject_Unlock(object);
|
||||||
return (nssCryptokiObject **)NULL;
|
return (nssCryptokiObject **)NULL;
|
||||||
}
|
}
|
||||||
nssPKIObject_Lock(object);
|
|
||||||
instances = nss_ZNEWARRAY(NULL, nssCryptokiObject *,
|
instances = nss_ZNEWARRAY(NULL, nssCryptokiObject *,
|
||||||
object->numInstances + 1);
|
object->numInstances + 1);
|
||||||
if (instances) {
|
if (instances) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue