b[0] = '\0';
LIST_ENTRY CachedEntriesHead = { &CachedEntriesHead, &CachedEntriesHead };
-PLIST_ENTRY pCachedEntry = NULL;
+PLIST_ENTRY pCachedEntry = &CachedEntriesHead;
BOOL
ShowAvailableAppInfo(INT Index)
PAPPLICATION_INFO Info;
HRESULT hr;
- /* initialize the cached list if hasn't been yet */
- if (pCachedEntry == NULL)
- {
- InitializeListHead(&CachedEntriesHead);
- pCachedEntry = &CachedEntriesHead;
- }
-
if (!GetStorageDirectory(szPath, _countof(szPath)))
return FALSE;
if (!lpEnumProc(ItemIndex, pszDisplayName, &Info))
break;
}
+ else
+ {
+ RegCloseKey(Info.hSubKey);
+ }
+ }
+ else
+ {
+ RegCloseKey(Info.hSubKey);
}
}
+ else
+ {
+ RegCloseKey(Info.hSubKey);
+ }
}
dwSize = MAX_PATH;
INT Index;
if (!SearchPatternMatch(lpName, szSearchPattern))
+ {
+ RegCloseKey(Info->hSubKey);
return TRUE;
+ }
ItemInfo = HeapAlloc(GetProcessHeap(), 0, sizeof(INSTALLED_INFO));
- if (!ItemInfo) return FALSE;
+ if (!ItemInfo)
+ {
+ RegCloseKey(Info->hSubKey);
+ return FALSE;
+ }
RtlCopyMemory(ItemInfo, Info, sizeof(INSTALLED_INFO));