Andrew Talbot : secur32: Fix some memory leaks.

Alexandre Julliard julliard at winehq.org
Fri Oct 5 04:55:55 CDT 2007


Module: wine
Branch: master
Commit: 9b1082ef3b76e6294673e729923a6208ce8f0751
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9b1082ef3b76e6294673e729923a6208ce8f0751

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Wed Oct  3 20:20:42 2007 +0100

secur32: Fix some memory leaks.

---

 dlls/secur32/ntlm.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/dlls/secur32/ntlm.c b/dlls/secur32/ntlm.c
index 5041892..4ae00a4 100644
--- a/dlls/secur32/ntlm.c
+++ b/dlls/secur32/ntlm.c
@@ -457,7 +457,10 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
         TRACE("First time in ISC()\n");
 
         if(!phCredential)
-            return SEC_E_INVALID_HANDLE;
+        {
+            ret = SEC_E_INVALID_HANDLE;
+            goto isc_end;
+        }
 
         /* As the server side of sspi never calls this, make sure that
          * the handler is a client handler.
@@ -466,7 +469,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
         if(ntlm_cred->mode != NTLM_CLIENT)
         {
             TRACE("Cred mode = %d\n", ntlm_cred->mode);
-            return SEC_E_INVALID_HANDLE;
+            ret = SEC_E_INVALID_HANDLE;
+            goto isc_end;
         }
 
         client_argv[0] = ntlm_auth;
@@ -657,7 +661,10 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
         }
 
         if(!phContext)
-            return SEC_E_INVALID_HANDLE;
+        {
+            ret = SEC_E_INVALID_HANDLE;
+            goto isc_end;
+        }
 
         /* As the server side of sspi never calls this, make sure that
          * the handler is a client handler.
@@ -666,7 +673,8 @@ static SECURITY_STATUS SEC_ENTRY ntlm_InitializeSecurityContextW(
         if(helper->mode != NTLM_CLIENT)
         {
             TRACE("Helper mode = %d\n", helper->mode);
-            return SEC_E_INVALID_HANDLE;
+            ret = SEC_E_INVALID_HANDLE;
+            goto isc_end;
         }
 
         if (!pInput->pBuffers[input_token_idx].pvBuffer)




More information about the wine-cvs mailing list