Henri Verbeet : secur32: Don' t try to cleanup uninitialized handles in SECUR32_deinitSchannelSP().

Alexandre Julliard julliard at winehq.org
Thu Oct 15 08:54:29 CDT 2009


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Thu Oct 15 10:36:44 2009 +0200

secur32: Don't try to cleanup uninitialized handles in SECUR32_deinitSchannelSP().

---

 dlls/secur32/schannel.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 380cfed..8b710a3 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -1415,13 +1415,13 @@ fail:
 
 void SECUR32_deinitSchannelSP(void)
 {
-    int i = schan_handle_table_size;
+    SIZE_T i = schan_handle_count;
 
     if (!libgnutls_handle) return;
 
     /* deinitialized sessions first because a pointer to the credentials
      * are stored for the session by calling gnutls_credentials_set. */
-    while (--i)
+    while (i--)
     {
         if (schan_handle_table[i].type == SCHAN_HANDLE_CTX)
         {
@@ -1430,8 +1430,8 @@ void SECUR32_deinitSchannelSP(void)
             HeapFree(GetProcessHeap(), 0, ctx);
         }
     }
-    i = schan_handle_table_size;
-    while (--i)
+    i = schan_handle_count;
+    while (i--)
     {
         if (schan_handle_table[i].type != SCHAN_HANDLE_FREE)
         {




More information about the wine-cvs mailing list