Index: src/core/SkPaintOptionsAndroid.cpp |
diff --git a/src/core/SkPaintOptionsAndroid.cpp b/src/core/SkPaintOptionsAndroid.cpp |
index a08845a0b447a8c4a8ecacc45718434095db9df2..46e8060073d3e517662bc530173658cf4f04813d 100644 |
--- a/src/core/SkPaintOptionsAndroid.cpp |
+++ b/src/core/SkPaintOptionsAndroid.cpp |
@@ -35,9 +35,9 @@ void SkPaintOptionsAndroid::flatten(SkFlattenableWriteBuffer& buffer) const { |
void SkPaintOptionsAndroid::unflatten(SkFlattenableReadBuffer& buffer) { |
fFontVariant = (FontVariant)buffer.readUInt(); |
- char* tag = buffer.readString(); |
+ SkString tag; |
+ buffer.readString(&tag); |
fLanguage = SkLanguage(tag); |
- sk_free(tag); |
fUseFontFallbacks = buffer.readBool(); |
} |