summaryrefslogtreecommitdiffstats
path: root/WebCore
diff options
context:
space:
mode:
authorclaireho <chinglanho@gmail.com>2010-08-20 11:11:14 -0700
committerclaireho <chinglanho@gmail.com>2010-08-20 11:15:57 -0700
commita8cbb273facae4b7fc5c44de730b2068d59ebde7 (patch)
treed002dbd356d49d348ebc5a26d86f5954fb7836f2 /WebCore
parentc2734c93736c8d81f71459461411114e7cb6b44f (diff)
downloadexternal_webkit-a8cbb273facae4b7fc5c44de730b2068d59ebde7.zip
external_webkit-a8cbb273facae4b7fc5c44de730b2068d59ebde7.tar.gz
external_webkit-a8cbb273facae4b7fc5c44de730b2068d59ebde7.tar.bz2
Bug2857086 - memory leak in FontCustomPlatformData.
The change can also fix Chrome issue32353 - need to patch to Chrome. Change-Id: I08df08f2316156e78e9b63415e9c8720ab193090
Diffstat (limited to 'WebCore')
-rw-r--r--WebCore/platform/graphics/android/FontCustomPlatformData.cpp2
1 files changed, 2 insertions, 0 deletions
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());