提交 2f744a76 编写于 作者: C chegar

6638560: APPCRASH in "SPNEGO_HTTP_AUTH/PROXY_FALLBACK" test case with 64 bit...

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
上级 7a0daf2b
......@@ -52,7 +52,7 @@ static INITIALIZE_SECURITY_CONTEXT_FN pInitializeSecurityContext;
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 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_NTLMAuthSequence_get
}
if (ss < 0) {
endSequence (pCred, pCtx, OutBuffDesc);
endSequence (pCred, pCtx);
return 0;
}
......@@ -255,7 +255,7 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_NTLMAuthSequence_get
ss = pCompleteAuthToken( pCtx, &OutBuffDesc );
if (ss < 0) {
endSequence (pCred, pCtx, OutBuffDesc);
endSequence (pCred, pCtx);
return 0;
}
}
......@@ -265,25 +265,23 @@ JNIEXPORT jbyteArray JNICALL Java_sun_net_www_protocol_http_NTLMAuthSequence_get
(*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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册