From b224319a267441ac9cf8a99baa9ce01c6891c5f9 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 8 Feb 2007 20:35:44 +0100 Subject: [PATCH] devenum: Initialize hKeysub. --- dlls/devenum/devenum_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/devenum/devenum_main.c b/dlls/devenum/devenum_main.c index 66b0f0ed741..0dde409da3a 100644 --- a/dlls/devenum/devenum_main.c +++ b/dlls/devenum/devenum_main.c @@ -311,6 +311,7 @@ static HRESULT register_clsids(int count, const register_info * pRegInfo, LPCWST for (i = 0; i < count; i++) { + hkeySub = 0; if (SUCCEEDED(res)) { res = StringFromCLSID(pRegInfo[i].clsid, &clsidString); @@ -351,7 +352,7 @@ static HRESULT register_clsids(int count, const register_info * pRegInfo, LPCWST (lstrlenW(pszThreadingModel) + 1) * sizeof(WCHAR)); RegCloseKey(hkeyInproc32); } - RegCloseKey(hkeySub); + if (hkeySub) RegCloseKey(hkeySub); CoTaskMemFree(clsidString); clsidString = NULL; }