]> granicus.if.org Git - icu/commitdiff
ICU-7520 merge r27829 r27832 r27833 r27834 r27835
authorSteven R. Loomis <srl@icu-project.org>
Sat, 13 Mar 2010 06:10:49 +0000 (06:10 +0000)
committerSteven R. Loomis <srl@icu-project.org>
Sat, 13 Mar 2010 06:10:49 +0000 (06:10 +0000)
X-SVN-Rev: 27837

license.html
source/common/uresbund.c
source/i18n/selfmt.cpp
source/i18n/ucoleitr.cpp
source/test/intltest/selfmts.cpp
unicode-license.txt

index ba2871a33511326fca583e375c5cd7640138fd2b..7ae025291f4ec505464cca1e9c3c34f0c8f1b4b1 100644 (file)
@@ -11,7 +11,7 @@
 <p>COPYRIGHT AND PERMISSION NOTICE</p>
 
 <p>
-Copyright (c) 1995-2009 International Business Machines Corporation and others
+Copyright (c) 1995-2010 International Business Machines Corporation and others
 </p>
 <p>
 All rights reserved.
index c32b2051939d4053fcebb90c2e8bb549106e09a4..7b7afec7ad45e181280d2363e53c148a0e1d5de5 100644 (file)
@@ -598,6 +598,11 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID, UEr
                     }
                     t1 = t2;
                 } else {
+                    if (usingUSRData) {
+                        /* the USR override data wasn't found, delete it */
+                        uhash_remove(cache, u2);
+                        free_entry(u2);
+                    }
                     /* t2->fCountExisting have to be decremented since the call to init_entry increments
                      * it and if we hit this code, that means it is not set as the parent.
                      */
index 4c88d9cddade33a7fb18cee39d4d4692e1ac83ef..6fcec5b84932e5ffe2aae019bd7b845783c1589f 100755 (executable)
@@ -420,6 +420,7 @@ SelectFormat::copyHashtable(Hashtable *other, UErrorCode& status) {
     if (U_FAILURE(status)){
         return;
     }
+    parsedValuesHash->setValueDeleter(uhash_deleteUnicodeString);
 
     int32_t pos = -1;
     const UHashElement* elem = NULL;
index ed3ebb2b6cf31bd357b07e280a4ac8e9045b5bb5..b83046dba846ce8a41c3112a8f666a79a08ae216 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ******************************************************************************
-*   Copyright (C) 2001-20109, International Business Machines
+*   Copyright (C) 2001-2010, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 ******************************************************************************
 *
@@ -684,6 +684,10 @@ ucol_setText(      UCollationElements *elems,
     
     /* free offset buffer to avoid memory leak before initializing. */
     ucol_freeOffsetBuffer(&(elems->iteratordata_));
+    /* Ensure that previously allocated extendCEs is freed before setting to NULL. */
+    if (elems->iteratordata_.extendCEs != NULL) {
+        uprv_free(elems->iteratordata_.extendCEs);
+    }
     uprv_init_collIterate(elems->iteratordata_.coll, text, textLength, 
                           &elems->iteratordata_, status);
 
index 484bc29803aa08bd564c75eec1c2095379cf3beb..e81d44fe5533c1fb4ce22a8ab3c3a92fc24f3cb0 100644 (file)
@@ -115,6 +115,9 @@ void SelectFormatTest::selectFormatUnitTest(/*char *par*/)
         }
     }
 
+    delete selFmt;
+    selFmt = NULL;
+
     logln("SelectFormat Unit Test : Creating format object for Testing applying various patterns");
     status = U_ZERO_ERROR;
     selFmt = new SelectFormat( SIMPLE_PATTERN , status); 
@@ -164,6 +167,9 @@ void SelectFormatTest::selectFormatUnitTest(/*char *par*/)
         "*Keyword-_"        //Starts with a sepial character not allowed
     };
 
+    delete selFmt;
+    selFmt = NULL;
+
     selFmt = new SelectFormat( SIMPLE_PATTERN , status); 
     for (int32_t i = 0; i< 6; i++ ){
         status = U_ZERO_ERROR;
index cf5cfdb0182873872d5d3c9a01f171dbbab9ffc6..900059f882131aa5d44b4b775d4a74f3e6546104 100644 (file)
@@ -16,7 +16,7 @@ OR SOFTWARE.
 
     COPYRIGHT AND PERMISSION NOTICE
 
-    Copyright © 1991-2008 Unicode, Inc. All rights reserved. Distributed under
+    Copyright © 1991-2009 Unicode, Inc. All rights reserved. Distributed under
 the Terms of Use in http://www.unicode.org/copyright.html.
 
     Permission is hereby granted, free of charge, to any person obtaining a copy