devenum: Don't leak key handle creating a category registry key.
This commit is contained in:
parent
e02e539c1e
commit
ae4eafbecc
|
@ -202,8 +202,10 @@ static HRESULT DEVENUM_CreateAMCategoryKey(const CLSID * clsidCategory)
|
||||||
res = E_INVALIDARG;
|
res = E_INVALIDARG;
|
||||||
|
|
||||||
if (SUCCEEDED(res))
|
if (SUCCEEDED(res))
|
||||||
res = HRESULT_FROM_WIN32(
|
{
|
||||||
RegCreateKeyW(HKEY_CURRENT_USER, wszRegKey, &hkeyDummy));
|
LONG lRes = RegCreateKeyW(HKEY_CURRENT_USER, wszRegKey, &hkeyDummy);
|
||||||
|
res = HRESULT_FROM_WIN32(lRes);
|
||||||
|
}
|
||||||
|
|
||||||
if (hkeyDummy)
|
if (hkeyDummy)
|
||||||
RegCloseKey(hkeyDummy);
|
RegCloseKey(hkeyDummy);
|
||||||
|
|
Loading…
Reference in New Issue