diff options
author | sugoi <sugoi@chromium.org> | 2014-10-09 08:09:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-09 08:09:04 -0700 |
commit | 9a7f29ee5e40071d3b3025d22bbfa58953e6c821 (patch) | |
tree | a0ba3f50e98c0e87c880d11e6fe29aa37c9eabfd /src/effects | |
parent | 651713408c5a5d9565665967ad09981250c7a8c9 (diff) |
Leak fixed
BUG=skia:
Review URL: https://codereview.chromium.org/639423002
Diffstat (limited to 'src/effects')
-rw-r--r-- | src/effects/SkColorCubeFilter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp index cf3126bf39..9f0d36a30d 100644 --- a/src/effects/SkColorCubeFilter.cpp +++ b/src/effects/SkColorCubeFilter.cpp @@ -171,9 +171,8 @@ SkColorCubeFilter::SkColorCubeFilter(SkReadBuffer& buffer) SkFlattenable* SkColorCubeFilter::CreateProc(SkReadBuffer& buffer) { int cubeDimension = buffer.readInt(); - SkData* cubeData = buffer.readByteArrayAsData(); + SkAutoDataUnref cubeData(buffer.readByteArrayAsData()); if (!buffer.validate(is_valid_3D_lut(cubeData, cubeDimension))) { - SkSafeUnref(cubeData); return NULL; } return Create(cubeData, cubeDimension); |