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

Unified Diff: src/effects/SkColorCubeFilter.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
« no previous file with comments | « no previous file | src/effects/SkColorFilters.cpp » ('j') | src/effects/SkLumaColorFilter.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorCubeFilter.cpp
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp
index 253d2877596946a72899c83cc79648e7c3d0e0b2..8347a9e80f3f71f3fec45db926f9215f8e60c4b1 100644
--- a/src/effects/SkColorCubeFilter.cpp
+++ b/src/effects/SkColorCubeFilter.cpp
@@ -365,6 +365,9 @@ bool SkColorCubeFilter::asFragmentProcessors(GrContext* context,
if (frag) {
if (array) {
*array->append() = frag;
+ } else {
+ frag->unref();
+ SkDEBUGCODE(frag = NULL;)
}
return true;
}
« no previous file with comments | « no previous file | src/effects/SkColorFilters.cpp » ('j') | src/effects/SkLumaColorFilter.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698