~ubuntu-branches/ubuntu/quantal/nss/quantal

« back to all changes in this revision

Viewing changes to mozilla/security/nss/lib/nss/nssinit.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-02-27 14:45:29 UTC
  • Revision ID: package-import@ubuntu.com-20120227144529-lndj8u8pxhtw5886
Tags: 3.13.1.with.ckbi.1.88-1ubuntu6
Add protect-against-calls-before-nss_init.patch (RHBZ #784672).

Show diffs side-by-side

added added

removed removed

Lines of Context:
944
944
{
945
945
    int i;
946
946
 
 
947
    /* make sure our lock and condition variable are initialized one and only
 
948
     * one time */ 
 
949
    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
 
950
        return SECFailure;
 
951
    }
 
952
 
947
953
    PZ_Lock(nssInitLock);
948
954
    if (!NSS_IsInitialized()) {
949
955
        PZ_Unlock(nssInitLock);
1002
1008
{
1003
1009
    int i;
1004
1010
 
 
1011
    /* make sure our lock and condition variable are initialized one and only
 
1012
     * one time */ 
 
1013
    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
 
1014
        return SECFailure;
 
1015
    }
1005
1016
    PZ_Lock(nssInitLock);
1006
1017
    if (!NSS_IsInitialized()) {
1007
1018
        PZ_Unlock(nssInitLock);
1192
1203
{
1193
1204
    SECStatus rv = SECSuccess;
1194
1205
 
 
1206
    /* make sure our lock and condition variable are initialized one and only
 
1207
     * one time */ 
 
1208
    if (PR_CallOnce(&nssInitOnce, nss_doLockInit) != PR_SUCCESS) {
 
1209
        return SECFailure;
 
1210
    }
1195
1211
    PZ_Lock(nssInitLock);
1196
1212
    /* If one or more threads are in the middle of init, wait for them
1197
1213
     * to complete */