]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
2198. [bug] win32: RegCloseKey() could be called when
authorMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 03:02:18 +0000 (03:02 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 03:02:18 +0000 (03:02 +0000)
                        RegOpenKeyEx() failed. [RT #16911]

CHANGES
lib/isc/win32/ntpaths.c
lib/lwres/win32/lwconfig.c

diff --git a/CHANGES b/CHANGES
index ba7d5752fc54f4e0b7ddb5ab9716356c4695737f..3dbedb22bf8c95363dd1df5a98f78e22f7df72f8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+2198.  [bug]           win32: RegCloseKey() could be called when
+                       RegOpenKeyEx() failed. [RT #16911]
+
 2197.  [bug]           Add INSIST to catch negative responses which are
                        not setting the event result code appropriately.
                        [RT #16909]
index 7043c000dfbed0aa9647dc997e6a50647cfbdccb..8758ee23ca2bd3b288471d96182e8367186bdee0 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: ntpaths.c,v 1.9 2004/03/05 05:11:58 marka Exp $ */
+/* $Id: ntpaths.c,v 1.9.18.1 2007/06/18 03:02:18 marka Exp $ */
 
 /*
  * This module fetches the required path information that is specific
@@ -63,9 +63,8 @@ isc_ntpaths_init() {
                if (RegQueryValueEx(hKey, "InstallDir", NULL, NULL,
                        (LPBYTE)namedBase, &baseLen) != ERROR_SUCCESS)
                        keyFound = FALSE;
+               RegCloseKey(hKey);
        }
-       
-       RegCloseKey(hKey);
 
        GetSystemDirectory(systemDir, MAX_PATH);
 
index 9a8c742d11117377a6024d58158c5e81c742c878..067b5abec66568b0e4955879edb9fef7fad0e879 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lwconfig.c,v 1.2.18.2 2006/10/03 23:50:51 marka Exp $ */
+/* $Id: lwconfig.c,v 1.2.18.3 2007/06/18 03:02:18 marka Exp $ */
 
 /*
  * We do this so that we may incorporate everything in the main routines
@@ -67,10 +67,9 @@ get_win32_searchlist(lwres_context_t *ctx) {
                if (RegQueryValueEx(hKey, "SearchList", NULL, NULL,
                        (LPBYTE)searchlist, &searchlen) != ERROR_SUCCESS)
                        keyFound = FALSE;
+               RegCloseKey(hKey);
        }
        
-       RegCloseKey(hKey);
-
        confdata->searchnxt = 0;
 
        idx = 0;