Module: wine Branch: master Commit: 4467fd6d232cd715cd63b1ebf74c6013e19563b1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4467fd6d232cd715cd63b1ebf7...
Author: Hans Leidekker hans@codeweavers.com Date: Mon Oct 16 10:08:49 2017 +0200
secur32: Don't allocate a context handle in AcceptSecurityContext if new and passed in context are the same.
Signed-off-by: Hans Leidekker hans@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/secur32/wrapper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/secur32/wrapper.c b/dlls/secur32/wrapper.c index 06a3674..dba6754 100644 --- a/dlls/secur32/wrapper.c +++ b/dlls/secur32/wrapper.c @@ -399,7 +399,8 @@ SECURITY_STATUS WINAPI AcceptSecurityContext( ret = package->provider->fnTableW.AcceptSecurityContext( cred, phContext ? &myCtxt : NULL, pInput, fContextReq, TargetDataRep, &myCtxt, pOutput, pfContextAttr, ptsExpiry); - if (ret == SEC_E_OK || ret == SEC_I_CONTINUE_NEEDED) + if ((ret == SEC_E_OK || ret == SEC_I_CONTINUE_NEEDED) && + phNewContext && phNewContext != phContext) { SECURITY_STATUS ret2; ret2 = SECUR32_makeSecHandle(phNewContext, package, &myCtxt);