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

Unified Diff: src/effects/SkColorFilterImageFilter.cpp

Issue 461253007: fix leak in new createproc (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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/effects/SkColorFilterImageFilter.cpp
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index 2a7cc3107a5fa2b6c9836b7cff56222aaced4b25..0087627ce9e232b576d12ad174228f73a3362acb 100755
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -92,7 +92,8 @@ SkColorFilterImageFilter::SkColorFilterImageFilter(SkReadBuffer& buffer)
SkFlattenable* SkColorFilterImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 1);
- return Create(buffer.readColorFilter(), common.getInput(0), &common.cropRect());
+ SkAutoTUnref<SkColorFilter> cf(buffer.readColorFilter());
+ return Create(cf, common.getInput(0), &common.cropRect());
}
void SkColorFilterImageFilter::flatten(SkWriteBuffer& buffer) const {
« 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