From 29be7958de367a7067a3a236c5a23f88ce8e53a4 Mon Sep 17 00:00:00 2001 From: msarett Date: Thu, 9 Apr 2015 13:14:40 -0700 Subject: Fix ASAN error BUG=skia: TBR= Review URL: https://codereview.chromium.org/1072183002 --- tests/SwizzlerTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/SwizzlerTest.cpp') diff --git a/tests/SwizzlerTest.cpp b/tests/SwizzlerTest.cpp index 1355f3be8c..f02f86b682 100644 --- a/tests/SwizzlerTest.cpp +++ b/tests/SwizzlerTest.cpp @@ -28,7 +28,7 @@ static void check_fill(skiatest::Reporter* r, const size_t totalBytes = imageInfo.getSafeSize(rowBytes) + offset; // Create fake image data where every byte has a value of 0 - SkAutoTDelete storage((uint8_t*) sk_malloc_throw(totalBytes)); + SkAutoTDeleteArray storage(SkNEW_ARRAY(uint8_t, totalBytes)); memset(storage.get(), 0, totalBytes); // Adjust the pointer in order to test on different memory alignments uint8_t* imageData = storage.get() + offset; -- cgit v1.2.3