From: Michael Ow Date: Tue, 10 Sep 2013 17:03:42 +0000 (+0000) Subject: ICU-10331 Fix memory leak in data test X-Git-Tag: milestone-59-0-1~2579 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=05020159888d2a7d595d06f92b1c37037f385c8d;p=icu ICU-10331 Fix memory leak in data test X-SVN-Rev: 34260 --- diff --git a/icu4c/source/test/cintltst/udatatst.c b/icu4c/source/test/cintltst/udatatst.c index 09aef10030a..70c4f66baa1 100644 --- a/icu4c/source/test/cintltst/udatatst.c +++ b/icu4c/source/test/cintltst/udatatst.c @@ -156,32 +156,33 @@ static void TestUDataOpen(){ * If packaging mode == dll, the file may not exist. So, if the file is * missing, skip this test without error. */ - icuDataFilePath = (char *)malloc(strlen(path) + 10); + icuDataFilePath = (char *)uprv_malloc(strlen(path) + 10); strcpy(icuDataFilePath, path); strcat(icuDataFilePath, ".dat"); /* lots_of_mallocs(); */ if (uprv_fileExists(icuDataFilePath)) - { - int i; - log_verbose("Testing udata_open() on %s\n", icuDataFilePath); - for(i=0; i