Index: nss/lib/softoken/pkcs11.c |
diff --git a/nss/lib/softoken/pkcs11.c b/nss/lib/softoken/pkcs11.c |
index a4e769e086128ca75551cdb9f77d6b649e326d42..c54194662803a105c1e1c0b1ad4a621193d58545 100644 |
--- a/nss/lib/softoken/pkcs11.c |
+++ b/nss/lib/softoken/pkcs11.c |
@@ -2057,12 +2057,12 @@ sftk_verifyRSAPrivateKey(SFTKObject *object, PRBool fillIfNeeded) |
sftk_item_expand(&tmpKey.exponent1)); |
if (crv != CKR_OK) goto loser; |
} |
- if (!exponent1 || exponent1->attrib.pValue != tmpKey.exponent1.data) { |
+ if (!exponent2 || exponent2->attrib.pValue != tmpKey.exponent2.data) { |
crv = sftk_forceAttribute(object, CKA_EXPONENT_2, |
sftk_item_expand(&tmpKey.exponent2)); |
if (crv != CKR_OK) goto loser; |
} |
- if (!exponent1 || exponent1->attrib.pValue != tmpKey.exponent1.data) { |
+ if (!coefficient || coefficient->attrib.pValue != tmpKey.coefficient.data) { |
crv = sftk_forceAttribute(object, CKA_COEFFICIENT, |
sftk_item_expand(&tmpKey.coefficient)); |
if (crv != CKR_OK) goto loser; |
@@ -2089,6 +2089,15 @@ loser: |
if (publicExponent) { |
sftk_FreeAttribute(publicExponent); |
} |
+ if (exponent1) { |
+ sftk_FreeAttribute(exponent1); |
+ } |
+ if (exponent2) { |
+ sftk_FreeAttribute(exponent2); |
+ } |
+ if (coefficient) { |
+ sftk_FreeAttribute(coefficient); |
+ } |
return rv; |
} |