Bug 158339: we should not call secmod_freeParams if RNG_RNGInit fails.
authorwtc%netscape.com
Fri, 19 Jul 2002 18:31:30 +0000
changeset 3337 fdb5638aa0594c9dcaacb12cde174bdaa1de1e5d
parent 3336 2a782e93cc0388c2613efa58cdf80fa734a455bd
child 3338 329d8d6e7ba9f1b25d48dd34c2675587c19459c4
push idunknown
push userunknown
push dateunknown
bugs158339
Bug 158339: we should not call secmod_freeParams if RNG_RNGInit fails.
security/nss/lib/softoken/pkcs11.c
--- a/security/nss/lib/softoken/pkcs11.c
+++ b/security/nss/lib/softoken/pkcs11.c
@@ -2444,17 +2444,17 @@ CK_RV nsc_CommonInitialize(CK_VOID_PTR p
     SECStatus rv;
     CK_C_INITIALIZE_ARGS *init_args = (CK_C_INITIALIZE_ARGS *) pReserved;
     int i;
     int moduleIndex = isFIPS? NSC_FIPS_MODULE : NSC_NON_FIPS_MODULE;
 
     rv = RNG_RNGInit();         /* initialize random number generator */
     if (rv != SECSuccess) {
 	crv = CKR_DEVICE_ERROR;
-	goto loser;
+	return crv;
     }
     RNG_SystemInfoForRNG();
 
 
     /* NOTE:
      * we should be getting out mutexes from this list, not statically binding
      * them from NSPR. This should happen before we allow the internal to split
      * off from the rest on NSS.