Bug 507377: useless null check of params in nsc_parameter_gen SOFTOKEN_3_13_BRANCH
authornelson%bolyard.com
Mon, 15 Mar 2010 08:16:54 +0000
branchSOFTOKEN_3_13_BRANCH
changeset 9591 80ac55c9a517698c5a820b9915077db791b16fc9
parent 9590 d0c489f89f3d0fe7e99baa5fd9e68f8887947b59
child 9601 91d2f6532feb6f662618beb78a2fd22005df10c1
push idunknown
push userunknown
push dateunknown
bugs507377
Bug 507377: useless null check of params in nsc_parameter_gen Patch contributed by Timeless <timeless@mozdev.org>, r=nelson
security/nss/lib/softoken/pkcs11c.c
--- a/security/nss/lib/softoken/pkcs11c.c
+++ b/security/nss/lib/softoken/pkcs11c.c
@@ -2894,19 +2894,18 @@ nsc_parameter_gen(CK_KEY_TYPE key_type, 
     crv = sftk_AddAttributeType(key,CKA_NETSCAPE_PQG_SEED,
 				 vfy->seed.data, vfy->seed.len);
     if (crv != CKR_OK) goto loser;
     crv = sftk_AddAttributeType(key,CKA_NETSCAPE_PQG_H,
 				 vfy->h.data, vfy->h.len);
     if (crv != CKR_OK) goto loser;
 
 loser:
-    if (params) {
-	PQG_DestroyParams(params);
-    }
+    PQG_DestroyParams(params);
+
     if (vfy) {
 	PQG_DestroyVerify(vfy);
     }
     return crv;
 }
 
 
 static CK_RV