aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/utils/debugger/SkObjectParser.cpp3
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: {