]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/test/intltest/fldset.cpp
ICU-491.11.1.tar.gz
[apple/icu.git] / icuSources / test / intltest / fldset.cpp
index b289ad60169308d5818588b3d02a85f68af85a7c..fcea3e072485115cc0d5d5a3be09c5d1a73c378b 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ************************************************************************
-* Copyright (c) 2007-2008, International Business Machines
+* Copyright (c) 2007-2011, International Business Machines
 * Corporation and others.  All Rights Reserved.
 ************************************************************************
 */
@@ -119,6 +119,8 @@ int32_t FieldsSet::parseFrom(const UnicodeString& str, const
             u_UCharsToChars(u, ch, len);
             ch[len] = 0; /* include terminating \0 */
             it_errln(UnicodeString("Parse Failed: Field ") + UnicodeString(ch) + UnicodeString(", err ") + UnicodeString(u_errorName(status)));
+            delete[] kv;
+            delete[] dest;
             return -1;
         }
 
@@ -132,6 +134,8 @@ int32_t FieldsSet::parseFrom(const UnicodeString& str, const
                 u_UCharsToChars(u, ch, len);
                 ch[len] = 0; /* include terminating \0 */
                 it_errln(UnicodeString("Parse Failed: Value ") + UnicodeString(ch) + UnicodeString(", err ") + UnicodeString(u_errorName(status)));
+                delete[] kv;
+                delete[] dest;
                 return -1;
             }