# HG changeset patch # User chegar # Date 1204650549 0 # Node ID f24a98c3df49666a68469fad80de376ae11b6001 # Parent 74fe6922716dbd4e10b5d5efbf23af551b84a697 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 diff -r 74fe6922716d -r f24a98c3df49 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);