From: Jeff Genovy <29107334+jefgen@users.noreply.github.com>
Date: Wed, 31 May 2017 17:17:54 +0000 (+0000)
Subject: ICU-13217 - UWP version ends up falling back to the 'en_US' locale. (Missing lines... 
X-Git-Tag: milestone-60-0-1~49
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=de6771cb4b29add2e0da70e1d91348ed3a74d306;p=icu

ICU-13217 - UWP version ends up falling back to the 'en_US' locale. (Missing lines due to bad merge).

X-SVN-Rev: 40146
---

diff --git a/icu4c/source/common/putil.cpp b/icu4c/source/common/putil.cpp
index 14922a7a9db..511ffb81ab6 100644
--- a/icu4c/source/common/putil.cpp
+++ b/icu4c/source/common/putil.cpp
@@ -1809,6 +1809,8 @@ The leftmost codepage (.xxx) wins.
         }
 
         // Now normalize the resulting name
+        correctedPOSIXLocale = static_cast<char *>(uprv_malloc(POSIX_LOCALE_CAPACITY + 1));
+        /* TODO: Should we just exit on memory allocation failure? */
         if (correctedPOSIXLocale)
         {
             int32_t posixLen = uloc_canonicalize(modifiedWindowsLocale, correctedPOSIXLocale, POSIX_LOCALE_CAPACITY, &status);