6638560: APPCRASH in "SPNEGO_HTTP_AUTH/PROXY_FALLBACK" test case with 64 bit JDK on Win2008 x64, VinVista x64
authorchegar
Tue, 04 Mar 2008 17:09:09 +0000
changeset 72 f24a98c3df49
parent 25 74fe6922716d
child 73 cf334423502b
6638560: APPCRASH in "SPNEGO_HTTP_AUTH/PROXY_FALLBACK" test case with 64 bit JDK on Win2008 x64, VinVista x64 Summary: Remove incorrect free from native code Reviewed-by: jccollet
jdk/src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c
--- a/jdk/src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c	Fri Feb 29 20:04:01 2008 -0800
+++ b/jdk/src/windows/native/sun/net/www/protocol/http/NTLMAuthSequence.c	Tue Mar 04 17:09:09 2008 +0000
@@ -52,7 +52,7 @@
 static COMPLETE_AUTH_TOKEN_FN pCompleteAuthToken;
 static DELETE_SECURITY_CONTEXT_FN pDeleteSecurityContext;
 
-static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, SecBufferDesc OutBuffDesc);
+static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle);
 
 static jfieldID ntlm_ctxHandleID;
 static jfieldID ntlm_crdHandleID;
@@ -247,7 +247,7 @@
     }
 
     if (ss < 0) {
-        endSequence (pCred, pCtx, OutBuffDesc);
+        endSequence (pCred, pCtx);
         return 0;
     }
 
@@ -255,7 +255,7 @@
         ss = pCompleteAuthToken( pCtx, &OutBuffDesc );
 
         if (ss < 0) {
-            endSequence (pCred, pCtx, OutBuffDesc);
+            endSequence (pCred, pCtx);
             return 0;
         }
     }
@@ -265,25 +265,23 @@
         (*env)->SetByteArrayRegion(env, ret, 0, OutSecBuff.cbBuffer,
                 OutSecBuff.pvBuffer);
         if (lastToken != 0) // 2nd stage
-            endSequence (pCred, pCtx, OutBuffDesc);
+            endSequence (pCred, pCtx);
         result = ret;
     }
 
     if ((ss != SEC_I_CONTINUE_NEEDED) && (ss == SEC_I_COMPLETE_AND_CONTINUE)) {
-        endSequence (pCred, pCtx, OutBuffDesc);
+        endSequence (pCred, pCtx);
     }
 
     return result;
 }
 
-static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle, SecBufferDesc OutBuffDesc) {
+static void endSequence (PCredHandle credHand, PCtxtHandle ctxHandle) {
     if (credHand != 0) {
         pFreeCredentialsHandle (credHand);
         free (credHand);
     }
 
-    pFreeContextBuffer (&OutBuffDesc);
-
     if (ctxHandle != 0) {
         pDeleteSecurityContext(ctxHandle);
         free (ctxHandle);