Index: src/images/SkImageRef_ashmem.cpp |
diff --git a/src/images/SkImageRef_ashmem.cpp b/src/images/SkImageRef_ashmem.cpp |
index dc604651249c84915eb19ce8223305f110e185f1..a4058ff6d77b0d42581194c9bdfa89989788655a 100644 |
--- a/src/images/SkImageRef_ashmem.cpp |
+++ b/src/images/SkImageRef_ashmem.cpp |
@@ -223,9 +223,8 @@ SkImageRef_ashmem::SkImageRef_ashmem(SkFlattenableReadBuffer& buffer) |
fRec.fSize = 0; |
fRec.fPinned = false; |
fCT = NULL; |
- char* uri = buffer.readString(); |
- if (uri) { |
- setURI(uri); |
- sk_free(uri); |
- } |
+ |
+ SkString uri; |
+ buffer.readString(&uri); |
+ this->setURI(uri); |
} |