diff options
author | Jonathan Kew <jfkthame@googlemail.com> | 2007-11-21 12:29:46 +0000 |
---|---|---|
committer | Jonathan Kew <jfkthame@googlemail.com> | 2007-11-21 12:29:46 +0000 |
commit | 952d69f85d43b087ce9fa79d3fc6f1c076000bc7 (patch) | |
tree | dd6937a6486e80e1638618308481075efab000ae /Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp | |
parent | 888236cb9df7b7d7b5a3e2d784037a9a59511c53 (diff) |
updated icu-xetex library for XeTeX 0.997
git-svn-id: svn://tug.org/texlive/trunk@5536 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp')
-rw-r--r-- | Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp b/Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp index 97269f580bd..72b5a6d8adb 100644 --- a/Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp +++ b/Build/source/libs/icu-xetex/tools/ctestfw/uperf.cpp @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 2002-2005, International Business Machines Corporation and + * Copyright (c) 2002-2006, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ @@ -151,9 +151,9 @@ UPerfTest::UPerfTest(int32_t argc, const char* argv[], UErrorCode& status){ resolvedFileName = NULL; if(fileName!=NULL){ //pre-flight - ucbuf_resolveFileName(sourceDir, fileName,resolvedFileName,&len, &status); + ucbuf_resolveFileName(sourceDir, fileName, NULL, &len, &status); resolvedFileName = (char*) uprv_malloc(len); - if(fileName==NULL){ + if(resolvedFileName==NULL){ status= U_MEMORY_ALLOCATION_ERROR; return; } @@ -193,12 +193,12 @@ ULine* UPerfTest::getLines(UErrorCode& status){ if(newLines == NULL) { fprintf(stderr, "Out of memory reading line %d.\n", (int)numLines); status= U_MEMORY_ALLOCATION_ERROR; - delete lines; + delete []lines; return NULL; } memcpy(newLines, lines, numLines*sizeof(ULine)); - delete lines; + delete []lines; lines = newLines; } } @@ -464,6 +464,9 @@ UPerfTest::~UPerfTest(){ if(buffer!=NULL){ uprv_free(buffer); } + if(resolvedFileName!=NULL){ + uprv_free(resolvedFileName); + } ucbuf_close(ucharBuf); } |