]> granicus.if.org Git - icu/commitdiff
ICU-7912 Fix memory leak in cintltst TestUFormattable
authorMichael Ow <mow@svn.icu-project.org>
Tue, 13 Aug 2013 23:32:48 +0000 (23:32 +0000)
committerMichael Ow <mow@svn.icu-project.org>
Tue, 13 Aug 2013 23:32:48 +0000 (23:32 +0000)
X-SVN-Rev: 34040

icu4c/source/test/cintltst/cnumtst.c

index 0b1806caa46125019053a936597b9d2e3d3c69d7..37b5bf601e5efa504a048dc5bb969d2147422677 100644 (file)
@@ -2188,12 +2188,13 @@ static void TestUFormattable(void) {
       UFormattable *ufmt = ufmt_open(&status);
       unum_parseToUFormattable(unum, ufmt, str, -1, NULL, &status);
       if (ufmt_isNumeric(ufmt)) {
-       result = ufmt_getLong(ufmt, &status); /* == 123 */
+          result = ufmt_getLong(ufmt, &status); /* == 123 */
       } /* else { ... } */
       ufmt_close(ufmt);
       //! [unum_parseToUFormattable]
       assertTrue("result == 123", (result == 123));
     }
+    unum_close(unum);
   }
   // test with explicitly created ufmt_open
   {