Author: ekohl
Date: Wed Jun  7 14:10:43 2017
New Revision: 74941

URL: http://svn.reactos.org/svn/reactos?rev=74941&view=rev
Log:
[INTL]
Fix freeing logic in GetSupportedCP().
Patch by Victor Martinez Calvo.
CORE-13385

Modified:
    trunk/reactos/dll/cpl/intl/advanced.c

Modified: trunk/reactos/dll/cpl/intl/advanced.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/intl/advanced.c?rev=74941&r1=74940&r2=74941&view=diff
==============================================================================
--- trunk/reactos/dll/cpl/intl/advanced.c       [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/intl/advanced.c       [iso-8859-1] Wed Jun  7 
14:10:43 2017
@@ -61,18 +61,19 @@
             {
                 pCodePage->NextItem = PCPage;
                 PCPage = pCodePage;
+
+                wsprintf(szSection, L"CODEPAGE_REMOVE_%d", uiCodePage);
+
+                if ((uiCodePage == GetACP()) ||
+                    (uiCodePage == GetOEMCP()) ||
+                    (!SetupFindFirstLineW(hInf, szSection, L"AddReg", 
&Context2)))
+                {
+                    pCodePage->Flags |= CODEPAGE_NOT_REMOVEABLE;
+                }
             }
             else
             {
                 HeapFree(GetProcessHeap(), 0, pCodePage);
-            }
-
-            wsprintf(szSection, L"CODEPAGE_REMOVE_%d", uiCodePage);
-            if ((uiCodePage == GetACP()) ||
-                (uiCodePage == GetOEMCP()) ||
-                (!SetupFindFirstLineW(hInf, szSection, L"AddReg", &Context2)))
-            {
-                pCodePage->Flags |= CODEPAGE_NOT_REMOVEABLE;
             }
         }
 


Reply via email to