Rob Shearman : secur32: Fix memory leaks in ntlm_InitializeSecurityContextW .
Module: wine Branch: master Commit: 1346834605ebcc0dfdc60353298f2c1032238011 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1346834605ebcc0dfdc6035329... Author: Rob Shearman <robertshearman(a)gmail.com> Date: Tue Dec 29 19:06:23 2009 +0000 secur32: Fix memory leaks in ntlm_InitializeSecurityContextW. --- dlls/secur32/ntlm.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c index 3313fe4..a7330e2 100644 --- a/dlls/secur32/ntlm.c +++ b/dlls/secur32/ntlm.c @@ -549,6 +549,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( goto isc_end; } username = ntlm_GetUsernameArg(ui->wkui1_username, -1); + NetApiBufferFree(ui); TRACE("using cached credentials\n"); @@ -820,6 +821,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ret = SEC_E_BUFFER_TOO_SMALL; if ((phContext == NULL) && (pInput == NULL)) { + HeapFree(GetProcessHeap(), 0, helper->session_key); cleanup_helper(helper); phNewContext->dwUpper = 0; phNewContext->dwLower = 0; @@ -838,6 +840,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ret = SEC_E_BUFFER_TOO_SMALL; if ((phContext == NULL) && (pInput == NULL)) { + HeapFree(GetProcessHeap(), 0, helper->session_key); cleanup_helper(helper); phNewContext->dwUpper = 0; phNewContext->dwLower = 0; @@ -851,6 +854,7 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW( ret = SEC_E_INTERNAL_ERROR; if ((phContext == NULL) && (pInput == NULL)) { + HeapFree(GetProcessHeap(), 0, helper->session_key); cleanup_helper(helper); phNewContext->dwUpper = 0; phNewContext->dwLower = 0;
participants (1)
-
Alexandre Julliard