> There is a RegOpenKeyExA call present, but we do not close the handle. This 
> should be changed.
> The MS docu says 
> https://learn.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regopenkeyexa
> 'A pointer to a variable that receives a handle to the opened key. If the key 
> is not one of the predefined registry keys, call the 
> [RegCloseKey](https://learn.microsoft.com/en-us/windows/desktop/api/winreg/nf-winreg-regclosekey)
>  function after you have finished using the handle.'
> And in this coding we call
> `LONG lRet = ::RegOpenKeyExA(hRootKey, lpszSubKey, 0, KEY_ALL_ACCESS, &hKey);
> `
> with a non_NULL `lpszSubKey `so the RegCloseKey has to be done.
> 
> Also fixed a typo while at it.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Matthias Baesken has updated the pull request incrementally with one additional 
commit since the last revision:

  Use KEY_READ because we only query/read the registry

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/32249/files
  - new: https://git.openjdk.org/jdk/pull/32249/files/cc65371d..9f22f82c

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=32249&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=32249&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/32249.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/32249/head:pull/32249

PR: https://git.openjdk.org/jdk/pull/32249

Reply via email to