Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: source/common/uloc_tag.c

Issue 1621843002: ICU 56 update step 1 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/icu.git@561
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/common/uloc.cpp ('k') | source/common/umutex.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/common/uloc_tag.c
diff --git a/source/common/uloc_tag.c b/source/common/uloc_tag.c
index c038026790d6a9bc55dc2501034f99568b9c9467..0583ea5e1485b485388f70b61f32484a395de159 100644
--- a/source/common/uloc_tag.c
+++ b/source/common/uloc_tag.c
@@ -1,6 +1,6 @@
/*
**********************************************************************
-* Copyright (C) 2009-2014, International Business Machines
+* Copyright (C) 2009-2015, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
*/
@@ -1320,7 +1320,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT
/* BCP47 representation of LDML key/type pairs */
while (!isDone) {
const char *pNextBcpKey = NULL;
- int32_t nextBcpKeyLen;
+ int32_t nextBcpKeyLen = 0;
UBool emitKeyword = FALSE;
if (*pTag) {
@@ -1833,6 +1833,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
tagBuf = (char*)uprv_malloc(newTagLength + 1);
if (tagBuf == NULL) {
*status = U_MEMORY_ALLOCATION_ERROR;
+ ultag_close(t);
return NULL;
}
t->buf = tagBuf;
@@ -2129,7 +2130,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta
return t;
error:
- uprv_free(t);
+ ultag_close(t);
return NULL;
}
« no previous file with comments | « source/common/uloc.cpp ('k') | source/common/umutex.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698