[SYSSETUP] Close the device key after the property sheet page has been released.

This commit is contained in:
Eric Kohl 2018-04-29 15:41:03 +02:00
parent 6c16f12de5
commit b6ebd50d3f

View file

@ -490,9 +490,15 @@ MouseCallback(
UINT uMsg, UINT uMsg,
LPPROPSHEETPAGE ppsp) LPPROPSHEETPAGE ppsp)
{ {
PMOUSE_INFO pMouseInfo;
pMouseInfo = (PMOUSE_INFO)ppsp->lParam;
if (uMsg == PSPCB_RELEASE) if (uMsg == PSPCB_RELEASE)
{ {
HeapFree(GetProcessHeap(), 0, (PMOUSE_INFO)ppsp->lParam); if (pMouseInfo->hDeviceKey != NULL)
RegCloseKey(pMouseInfo->hDeviceKey);
HeapFree(GetProcessHeap(), 0, pMouseInfo);
} }
return 1; return 1;