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

Unified Diff: src/gpu/GrTessellatingPathRenderer.cpp

Issue 1270103003: Fix SkData leaks at GrResourceKey::setCustomData() call sites. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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 | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp
index 5d83dd7dde9fb7c62af3864fead67c38d08dcaed..62b8f0ee488308787253fca0998051dfaefe703a 100644
--- a/src/gpu/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/GrTessellatingPathRenderer.cpp
@@ -1489,7 +1489,8 @@ public:
TessInfo info;
info.fTolerance = isLinear ? 0 : tol;
info.fCount = actualCount;
- key->setCustomData(SkData::NewWithCopy(&info, sizeof(info)));
+ SkAutoTUnref<SkData> data(SkData::NewWithCopy(&info, sizeof(info)));
+ key->setCustomData(data.get());
resourceProvider->assignUniqueKeyToResource(*key, vertexBuffer.get());
SkPathPriv::AddGenIDChangeListener(fPath, SkNEW(PathInvalidator(*key)));
}
« no previous file with comments | « no previous file | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698