From: Mark Andrews Date: Mon, 18 Jun 2007 03:04:58 +0000 (+0000) Subject: 2198. [bug] win32: RegCloseKey() could be called when X-Git-Tag: v9.2.0b1^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=63bfd2235a2d94ccc06eee512e97638a4c002986;p=thirdparty%2Fbind9.git 2198. [bug] win32: RegCloseKey() could be called when RegOpenKeyEx() failed. [RT #16911] --- diff --git a/CHANGES b/CHANGES index 16615e5de6a..2db02df30ce 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 5489e0aadd4..0bb44f9e3fe 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.6.2.3 2004/03/09 06:12:19 marka Exp $ */ +/* $Id: ntpaths.c,v 1.6.2.4 2007/06/18 03:04:58 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);