Index: src/utils/SkPDFRasterizer.cpp |
diff --git a/src/utils/SkPDFRasterizer.cpp b/src/utils/SkPDFRasterizer.cpp |
index 1cb792fb817084cd002af0f68905a6776daf6ce8..d44dfa30b95c6f44ce5aed09930c2e86d7437874 100644 |
--- a/src/utils/SkPDFRasterizer.cpp |
+++ b/src/utils/SkPDFRasterizer.cpp |
@@ -27,6 +27,7 @@ |
#ifdef SK_BUILD_POPPLER |
bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) { |
+ SkAutoTDelete<SkStream> streamDeleter(pdf); |
size_t size = pdf->getLength(); |
SkAutoFree buffer(sk_malloc_throw(size)); |
pdf->read(buffer.get(), size); |
@@ -81,6 +82,7 @@ bool SkPopplerRasterizePDF(SkStream* pdf, SkBitmap* output) { |
#ifdef SK_BUILD_NATIVE_PDF_RENDERER |
bool SkNativeRasterizePDF(SkStream* pdf, SkBitmap* output) { |
+ SkAutoTDelete<SkStream> streamDeleter(pdf); |
return SkPDFNativeRenderToBitmap(pdf, output); |
} |
#endif // SK_BUILD_NATIVE_PDF_RENDERER |