crypt32: Fix leak on error path

Juan Lang juan.lang at gmail.com
Tue Aug 4 13:50:54 CDT 2009


Spotted by Chris Ahrendt.
--Juan
-------------- next part --------------
From e60fbcea8be306144c8d32ea8bed7ff1cd733050 Mon Sep 17 00:00:00 2001
From: Juan Lang <juan.lang at gmail.com>
Date: Tue, 4 Aug 2009 11:51:01 -0700
Subject: [PATCH 11/11] Fix leak on error path

---
 dlls/crypt32/rootstore.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/rootstore.c b/dlls/crypt32/rootstore.c
index a2ed6e5..bd6dfac 100644
--- a/dlls/crypt32/rootstore.c
+++ b/dlls/crypt32/rootstore.c
@@ -339,9 +339,9 @@ static BOOL import_certs_from_dir(LPCSTR path, HCERTSTORE store)
                         ret = TRUE;
                 }
             }
-            closedir(dir);
             CryptMemFree(filebuf);
         }
+        closedir(dir);
     }
     return ret;
 #else
-- 
1.6.3.2


More information about the wine-patches mailing list