From 09771823193d2b28b4fc3af6d50230fdabd15cfe Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Tue, 7 Aug 2007 09:01:12 +0000 Subject: [PATCH] ICU-5708 Fix a memory leak. X-SVN-Rev: 22300 --- icu4c/source/i18n/dtfmtsym.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/icu4c/source/i18n/dtfmtsym.cpp b/icu4c/source/i18n/dtfmtsym.cpp index c461c16912..bcaa176844 100644 --- a/icu4c/source/i18n/dtfmtsym.cpp +++ b/icu4c/source/i18n/dtfmtsym.cpp @@ -2253,7 +2253,6 @@ DateFormatSymbols::findZoneIDTypeValue( UnicodeString& zid, const UnicodeString& UnicodeString fbString; StringEnumeration *tzKeys = TimeZone::createEnumeration(); - tzKeys->reset(status); while( (myKey=tzKeys->snext(status))!= NULL){ status = U_ZERO_ERROR; this->getFallbackString(*myKey,fbString,status); @@ -2266,9 +2265,10 @@ DateFormatSymbols::findZoneIDTypeValue( UnicodeString& zid, const UnicodeString& type = (TimeZoneTranslationType) TIMEZONE_LONG_GENERIC; value.setTo(fbString); zid.setTo(*myKey); - return; + break; } } + delete tzKeys; } UnicodeString