Index: src/images/SkImageDecoder_libwebp.cpp |
diff --git a/src/images/SkImageDecoder_libwebp.cpp b/src/images/SkImageDecoder_libwebp.cpp |
index 07ff83de9bb10c3af344cede1cb0ab5d59315d35..52535779fa0b60eafd83939ec12ba725f873678f 100644 |
--- a/src/images/SkImageDecoder_libwebp.cpp |
+++ b/src/images/SkImageDecoder_libwebp.cpp |
@@ -201,8 +201,8 @@ static bool webp_idecode(SkStream* stream, WebPDecoderConfig* config) { |
} |
const size_t readBufferSize = stream->hasLength() ? |
SkTMin(stream->getLength(), WEBP_IDECODE_BUFFER_SZ) : WEBP_IDECODE_BUFFER_SZ; |
- SkAutoMalloc srcStorage(readBufferSize); |
- unsigned char* input = (uint8_t*)srcStorage.get(); |
+ SkAutoTMalloc<unsigned char> srcStorage(readBufferSize); |
+ unsigned char* input = srcStorage.get(); |
if (nullptr == input) { |
WebPIDelete(idec); |
WebPFreeDecBuffer(&config->output); |