diff options
author | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-26 21:20:04 +0000 |
---|---|---|
committer | scroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-08-26 21:20:04 +0000 |
commit | b9050d73f98912cdac6a4e058523e6a92e497f69 (patch) | |
tree | 7fd63773d07f465eb128206632869028446714dd /src | |
parent | 6e6dc653fc1cf8b91052e6859c49bda6e89c72f7 (diff) |
Remove mismatched delete.
Use SkAutoTArray to create an array and delete it safely.
BUG=https://code.google.com/p/skia/issues/detail?id=1547
R=bungeman@google.com
Review URL: https://codereview.chromium.org/23068033
git-svn-id: http://skia.googlecode.com/svn/trunk@10925 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/debugger/SkObjectParser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/utils/debugger/SkObjectParser.cpp b/src/utils/debugger/SkObjectParser.cpp index 504cd085c9..9dd77c0d73 100644 --- a/src/utils/debugger/SkObjectParser.cpp +++ b/src/utils/debugger/SkObjectParser.cpp @@ -336,10 +336,9 @@ SkString* SkObjectParser::TextToString(const void* text, size_t byteLength, case SkPaint::kUTF16_TextEncoding: { decodedText->append("UTF-16: "); size_t sizeNeeded = SkUTF16_ToUTF8((uint16_t*)text, byteLength / 2, NULL); - char* utf8 = new char[sizeNeeded]; + SkAutoSTMalloc<0x100, char> utf8(sizeNeeded); SkUTF16_ToUTF8((uint16_t*)text, byteLength / 2, utf8); decodedText->append(utf8, sizeNeeded); - delete utf8; break; } case SkPaint::kUTF32_TextEncoding: { |