Commit ae4eafbe authored by Thomas Weidenmueller's avatar Thomas Weidenmueller Committed by Alexandre Julliard

devenum: Don't leak key handle creating a category registry key.

parent e02e539c
......@@ -202,8 +202,10 @@ static HRESULT DEVENUM_CreateAMCategoryKey(const CLSID * clsidCategory)
res = E_INVALIDARG;
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)
RegCloseKey(hkeyDummy);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment