From: Mark Andrews Date: Mon, 18 Jun 2007 03:02:18 +0000 (+0000) Subject: 2198. [bug] win32: RegCloseKey() could be called when X-Git-Tag: v9.4.2b1~26 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=91c0ef1b667596cdd36aaf4db967ddb9d1e5d54a;p=thirdparty%2Fbind9.git 2198. [bug] win32: RegCloseKey() could be called when RegOpenKeyEx() failed. [RT #16911] --- diff --git a/CHANGES b/CHANGES index ba7d5752fc5..3dbedb22bf8 100644 --- 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] diff --git a/lib/isc/win32/ntpaths.c b/lib/isc/win32/ntpaths.c index 7043c000dfb..8758ee23ca2 100644 --- a/lib/isc/win32/ntpaths.c +++ b/lib/isc/win32/ntpaths.c @@ -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); diff --git a/lib/lwres/win32/lwconfig.c b/lib/lwres/win32/lwconfig.c index 9a8c742d111..067b5abec66 100644 --- a/lib/lwres/win32/lwconfig.c +++ b/lib/lwres/win32/lwconfig.c @@ -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;