https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b6ebd50d3f75e61f098b0…
commit b6ebd50d3f75e61f098b08b7fd23841c642c267c
Author: Eric Kohl <eric.kohl(a)reactos.org>
AuthorDate: Sun Apr 29 15:41:03 2018 +0200
Commit: Eric Kohl <eric.kohl(a)reactos.org>
CommitDate: Sun Apr 29 15:41:38 2018 +0200
[SYSSETUP] Close the device key after the property sheet page has been released.
---
dll/win32/syssetup/proppage.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dll/win32/syssetup/proppage.c b/dll/win32/syssetup/proppage.c
index 4072b224fd..0c1fcb08d1 100644
--- a/dll/win32/syssetup/proppage.c
+++ b/dll/win32/syssetup/proppage.c
@@ -490,9 +490,15 @@ MouseCallback(
UINT uMsg,
LPPROPSHEETPAGE ppsp)
{
+ PMOUSE_INFO pMouseInfo;
+
+ pMouseInfo = (PMOUSE_INFO)ppsp->lParam;
+
if (uMsg == PSPCB_RELEASE)
{
- HeapFree(GetProcessHeap(), 0, (PMOUSE_INFO)ppsp->lParam);
+ if (pMouseInfo->hDeviceKey != NULL)
+ RegCloseKey(pMouseInfo->hDeviceKey);
+ HeapFree(GetProcessHeap(), 0, pMouseInfo);
}
return 1;