Index: src/effects/SkColorCubeFilter.cpp |
diff --git a/src/effects/SkColorCubeFilter.cpp b/src/effects/SkColorCubeFilter.cpp |
index cf3126bf39c217dd2347fa74f255c912640f0f6c..9f0d36a30df76bac8db64d193de1f4e58bd955ad 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); |