From a8cbb273facae4b7fc5c44de730b2068d59ebde7 Mon Sep 17 00:00:00 2001 From: claireho Date: Fri, 20 Aug 2010 11:11:14 -0700 Subject: Bug2857086 - memory leak in FontCustomPlatformData. The change can also fix Chrome issue32353 - need to patch to Chrome. Change-Id: I08df08f2316156e78e9b63415e9c8720ab193090 --- WebCore/platform/graphics/android/FontCustomPlatformData.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'WebCore/platform/graphics') diff --git a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp index fbce1fa..90a9f41 100644 --- a/WebCore/platform/graphics/android/FontCustomPlatformData.cpp +++ b/WebCore/platform/graphics/android/FontCustomPlatformData.cpp @@ -64,6 +64,8 @@ FontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer) // make a copy of it. SkStream* stream = new SkMemoryStream(buffer->data(), buffer->size(), true); SkTypeface* face = SkTypeface::CreateFromStream(stream); + // Release the stream. + stream->unref(); if (0 == face) { SkDebugf("--------- SkTypeface::CreateFromBuffer failed %d\n", buffer->size()); -- cgit v1.1