fix memory leak introduced in 9e5f85e8
R=sugoi@chromium.org, robertphillips@google.com
Author: halcanary@google.com
Review URL: https://codereview.chromium.org/199173002
git-svn-id: http://skia.googlecode.com/svn/trunk@13786 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index f3dafc8..2ddd368 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -383,7 +383,8 @@
// Deserialize picture
SkValidatingReadBuffer reader(data, size);
- SkPicture* readPict(SkPicture::CreateFromBuffer(reader));
- REPORTER_ASSERT(reporter, NULL != readPict);
+ SkAutoTUnref<SkPicture> readPict(
+ SkPicture::CreateFromBuffer(reader));
+ REPORTER_ASSERT(reporter, NULL != readPict.get());
}
}