Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1308)

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 1006813010: SkPDF: Fix leak in SkPDFShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.cpp
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index 8fc97da30770153029a1e08fd461adb89e537d9d..97bca73f63b78d33c5e552736e4702f015277646 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -877,7 +877,8 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create(
pdfShader->insertName("ColorSpace", "DeviceRGB");
pdfShader->insert("Domain", domain.get());
- SkPDFStream* function = make_ps_function(functionCode, domain.get());
+ SkAutoTUnref<SkPDFStream> function(
+ make_ps_function(functionCode, domain.get()));
pdfShader->insert("Function", new SkPDFObjRef(function))->unref();
SkAutoTUnref<SkPDFArray> matrixArray(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698