aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm/DMJsonWriter.h
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-04-03 07:22:22 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-03 07:22:22 -0700
commit0a7e69cb9b4e3929d659891d152a2c0b59bff4e0 (patch)
tree692f458f6d6aa716a78d4dbfed985ef1b4d80e4d /dm/DMJsonWriter.h
parent3d626834b4b5ee2d6dda34da365dfe40520253aa (diff)
Get rid of leaks in SkCodec::NewFromStream.
SkCodec::NewFromStream claims to delete the passed in SkStream on failure. This allows the caller to pass an SkStream to the function and not worry about deleting it depending on the return value. Most of our SkCodecs did not honor this contract though. Update them to delete the stream on failure. Further, update SkCodec::NewFromStream to delete the stream if it did not match any subclass, and delete the SkCodec if we decided to return NULL because it was too big. Add a test which tests streams which represent the beginnings of supported format types but do not contain enough data to create an SkCodec. The interesting part of the test is when we run it on ASAN, which will report that we leaked something without the other changes. BUG=skia:3257 Review URL: https://codereview.chromium.org/1058873006
Diffstat (limited to 'dm/DMJsonWriter.h')
0 files changed, 0 insertions, 0 deletions