* Sync up to trunk head (r64716).
[reactos.git] / base / applications / rapps / available.c
index effde53..22ba9c6 100644 (file)
@@ -179,12 +179,16 @@ EnumAvailableApplications(INT EnumType, AVAILENUMPROC lpEnumProc)
     if (!GetLocaleInfoW(GetUserDefaultLCID(), LOCALE_ILANGUAGE,
                         szLocale, sizeof(szLocale) / sizeof(WCHAR)))
     {
+        FindClose(hFind);
         return FALSE;
     }
 
     hr = StringCbCatW(szSectionLocale, sizeof(szSectionLocale), szLocale);
     if (FAILED(hr))
+    {
+        FindClose(hFind);
         return FALSE;
+    }
 
 #define GET_STRING1(a, b)  \
     if (!ParserGetString(szSectionLocale, a, b, MAX_PATH, FindFileData.cFileName)) \