]> 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:05:46 +0000 (03:05 +0000)
committerMark Andrews <marka@isc.org>
Mon, 18 Jun 2007 03:05:46 +0000 (03:05 +0000)
                        RegOpenKeyEx() failed. [RT #16911]

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

diff --git a/CHANGES b/CHANGES
index 47afab5d5975fc961e48e70251f6ac959e5ff42f..04d9a75b9c39f51cde63b92a58ba8e9bf5a70306 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..b72c0d5116e8078153024347998d5428281a366b 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.10 2007/06/18 03:05:46 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 8645e9cd8ab9a9116c81e893f118dae4cb782d5d..e5995e769869a8110caaccc27bfd772e1e0c1b3f 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: lwconfig.c,v 1.4 2006/10/03 23:50:52 marka Exp $ */
+/* $Id: lwconfig.c,v 1.5 2007/06/18 03:05:46 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;