8008107: [parfait] Use after free of pointer in jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c
authorjzavgren
Tue, 19 Feb 2013 15:31:19 -0500
changeset 16012 d10572eb1f48
parent 16011 890a7ed97f6c
child 16013 3569e84e7429
8008107: [parfait] Use after free of pointer in jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c Reviewed-by: mullan, chegar
jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c
--- a/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c	Tue Feb 19 11:56:49 2013 -0800
+++ b/jdk/src/share/native/sun/security/pkcs11/wrapper/p11_convert.c	Tue Feb 19 15:31:19 2013 -0500
@@ -687,8 +687,8 @@
     if ((*env)->ExceptionCheck(env)) {
         free(ckParam.RandomInfo.pClientRandom);
         free(ckParam.RandomInfo.pServerRandom);
+        free(ckParam.pReturnedKeyMaterial->pIVClient);
         free(ckParam.pReturnedKeyMaterial);
-        free(ckParam.pReturnedKeyMaterial->pIVClient);
         return ckParam;
     }