ICU-7520 merge r27829 r27832 r27833 r27834 r27835

X-SVN-Rev: 27837
diff --git a/license.html b/license.html
index ba2871a..7ae0252 100644
--- a/license.html
+++ b/license.html
@@ -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.
diff --git a/source/common/uresbund.c b/source/common/uresbund.c
index c32b205..7b7afec 100644
--- a/source/common/uresbund.c
+++ b/source/common/uresbund.c
@@ -598,6 +598,11 @@
                     }
                     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.
                      */
diff --git a/source/i18n/selfmt.cpp b/source/i18n/selfmt.cpp
index 4c88d9c..6fcec5b 100755
--- a/source/i18n/selfmt.cpp
+++ b/source/i18n/selfmt.cpp
@@ -420,6 +420,7 @@
     if (U_FAILURE(status)){
         return;
     }
+    parsedValuesHash->setValueDeleter(uhash_deleteUnicodeString);
 
     int32_t pos = -1;
     const UHashElement* elem = NULL;
diff --git a/source/i18n/ucoleitr.cpp b/source/i18n/ucoleitr.cpp
index ed3ebb2..b83046d 100644
--- a/source/i18n/ucoleitr.cpp
+++ b/source/i18n/ucoleitr.cpp
@@ -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 @@
     
     /* 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);
 
diff --git a/source/test/intltest/selfmts.cpp b/source/test/intltest/selfmts.cpp
index 484bc29..e81d44f 100644
--- a/source/test/intltest/selfmts.cpp
+++ b/source/test/intltest/selfmts.cpp
@@ -115,6 +115,9 @@
         }
     }
 
+    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 @@
         "*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;
diff --git a/unicode-license.txt b/unicode-license.txt
index cf5cfdb..900059f 100644
--- a/unicode-license.txt
+++ b/unicode-license.txt
@@ -16,7 +16,7 @@
 
     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