[EXPLORER] Registry key not closed on error (#3136)

CORE-14519
This commit is contained in:
Kyle Katarn 2020-09-08 21:55:45 +02:00 committed by GitHub
parent 2c7ccf4bc9
commit d54e50f3dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -115,17 +115,18 @@ HRESULT InitShellServices(HDPA * phdpa)
goto cleanup;
}
RegCloseKey(hkey);
/* Initialize */
DPA_EnumCallback(hdpa, InitializeAllCallback, &hr);
if (FAILED_UNEXPECTEDLY(hr))
goto cleanup;
RegCloseKey(hkey);
*phdpa = hdpa;
return count > 0 ? S_OK : S_FALSE;
cleanup:
RegCloseKey(hkey);
*phdpa = NULL;
ShutdownShellServices(hdpa);
return hr;