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

This commit is contained in:
Thomas Weidenmueller 2005-12-05 20:39:47 +01:00 committed by Alexandre Julliard
parent e02e539c1e
commit ae4eafbecc
1 changed files with 4 additions and 2 deletions

View File

@ -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);