Index: src/core/SkPixmap.cpp |
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp |
index 57bb194258d5f2bdc7b6eb1953c2108d565eaf2b..5f3c3a086a7efa68ae54fea2591edcf36f339d59 100644 |
--- a/src/core/SkPixmap.cpp |
+++ b/src/core/SkPixmap.cpp |
@@ -315,9 +315,9 @@ const SkData* SkAutoPixmapStorage::detachPixelsAsData() { |
return nullptr; |
} |
- const SkData* data = SkData::NewFromMalloc(fStorage, this->getSafeSize()); |
+ auto data = SkData::MakeFromMalloc(fStorage, this->getSafeSize()); |
fStorage = nullptr; |
this->INHERITED::reset(); |
- return data; |
+ return data.release(); |
} |