Summary: | [GTK] FontCustomPlatformData.cpp leaks FT_Faces | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alp Toker <alp> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | gustavo, mrobinson, webkit.review.bot, xan.lopez | ||||
Priority: | P2 | Keywords: | Cairo, Gtk | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Alp Toker
2008-01-19 09:54:02 PST
From SimpleFontDataGtk.cpp: void SimpleFontData::platformDestroy() { if (!isCustomFont()) { if (m_font.m_pattern && ((FcPattern*)-1 != m_font.m_pattern)) { FcPatternDestroy(m_font.m_pattern); m_font.m_pattern = 0; } if (m_font.m_scaledFont) { cairo_scaled_font_destroy(m_font.m_scaledFont); m_font.m_scaledFont = 0; } } delete m_smallCapsFontData; } This isCustomFont() check looks overzealous as it won't free m_font.m_scaledFont which exists even in custom WebFonts. So, another potential leak here. This can probably be fixed by carrying the resources in the FontCustomPlatformData structure and freeing them in ~FontCustomPlatformData. Created attachment 68308 [details]
Patch for this issue
Attachment 68308 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WebCore/platform/graphics/cairo/FontCustomPlatformData.h:29: FT_Face is incorrectly named. Don't use underscores in your identifier names. [readability/naming] [4]
Total errors found: 1 in 3 files
If any of these errors are false positives, please file a bug against check-webkit-style.
This is a false positive. We should update check-webkit-style to ignore typedefs like these. Comment on attachment 68308 [details]
Patch for this issue
r=me
Committed r68041: <http://trac.webkit.org/changeset/68041> |