]> granicus.if.org Git - icu/commitdiff
ICU-10274 Close resource bundle after use
authorMichael Ow <mow@svn.icu-project.org>
Wed, 14 Aug 2013 20:17:38 +0000 (20:17 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Wed, 14 Aug 2013 20:17:38 +0000 (20:17 +0000)
X-SVN-Rev: 34042

icu4c/source/i18n/tmutfmt.cpp

index 98fe89a74c671356b5aa18c47e99fff60631b8f5..c872531687272ddbf7cd6b99081abde88108eef3 100644 (file)
@@ -639,9 +639,11 @@ TimeUnitFormat::loadNumericDurationFormat(const char *pattern, UErrorCode& statu
         return NULL;
     }
     if (U_FAILURE(status)) {
+        ures_close(rb);
         delete result;
         return NULL;
     }
+    ures_close(rb);
     result->setTimeZone(*TimeZone::getGMT());
     return result;
 }