Index: base/setup/reactos/reactos.c =================================================================== --- base/setup/reactos/reactos.c (revision 72017) +++ base/setup/reactos/reactos.c (working copy) @@ -555,6 +555,10 @@ while (SetupFindNextLine(&InfContext, &InfContext) && Count < pSetupData->LangCount); } } + else + { + return FALSE; + } } // get keyboard layout list @@ -585,6 +589,12 @@ while (SetupFindNextLine(&InfContext, &InfContext) && Count < pSetupData->KbLayoutCount); } } + else + { /* Deallocate memory */ + if (pSetupData->pLanguages) + HeapFree(GetProcessHeap(), 0, pSetupData->pLanguages); + return FALSE; + } } // get default for keyboard and language