From cb3b615af712fc71b19b86211c1d083430114d7e Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Thu, 14 Nov 2013 14:47:56 +0000 Subject: Address some more valgrind issues R=borenet@google.com Review URL: https://codereview.chromium.org/59713010 git-svn-id: http://skia.googlecode.com/svn/trunk@12286 2bbb7eff-a529-9590-31e7-b0007b416f81 --- tests/FontHostStreamTest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/FontHostStreamTest.cpp') diff --git a/tests/FontHostStreamTest.cpp b/tests/FontHostStreamTest.cpp index 30e469b410..e15bd5a355 100644 --- a/tests/FontHostStreamTest.cpp +++ b/tests/FontHostStreamTest.cpp @@ -15,6 +15,7 @@ #include "SkPaint.h" #include "SkPoint.h" #include "SkRect.h" +#include "SkStream.h" #include "SkTypeface.h" /////////////////////////////////////////////////////////////////////////////// @@ -99,7 +100,7 @@ static void test_fontHostStream(skiatest::Reporter* reporter) { } int ttcIndex; - SkStream* fontData = origTypeface->openStream(&ttcIndex); + SkAutoTUnref fontData(origTypeface->openStream(&ttcIndex)); SkTypeface* streamTypeface = SkTypeface::CreateFromStream(fontData); SkSafeUnref(paint.setTypeface(streamTypeface)); drawBG(&streamCanvas); -- cgit v1.2.3