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

Unified Diff: src/effects/SkTableColorFilter.cpp

Issue 1182813002: Don't leak fragment processor in SkColorFilter::asFragmentProcessors implementations. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 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
« src/effects/SkLumaColorFilter.cpp ('K') | « src/effects/SkLumaColorFilter.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkTableColorFilter.cpp
diff --git a/src/effects/SkTableColorFilter.cpp b/src/effects/SkTableColorFilter.cpp
index 27a5def5e527d8057c9f82f927bb8537625f0719..839b014c68c5bdf60fb5c3d5afe4068092cbc242 100644
--- a/src/effects/SkTableColorFilter.cpp
+++ b/src/effects/SkTableColorFilter.cpp
@@ -592,6 +592,9 @@ bool SkTable_ColorFilter::asFragmentProcessors(GrContext* context,
if (frag) {
if (array) {
*array->append() = frag;
+ } else {
+ frag->unref();
+ SkDEBUGCODE(frag = NULL;)
}
return true;
}
« src/effects/SkLumaColorFilter.cpp ('K') | « src/effects/SkLumaColorFilter.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698