Closed Bug 379433 Opened 17 years ago Closed 17 years ago

PangoItem and GList memory leaks in gfxPangoFonts

Categories

(Core :: Graphics, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha5

People

(Reporter: karlt, Assigned: karlt)

References

Details

(Keywords: memory-leak)

Attachments

(2 files, 1 obsolete file)

gfxPangoFontGroup::CreateGlyphRunsItemizing gets a GList (items) of PangoItems
from pango_itemize but only frees the empty GList at the end of items.

This patch frees each PangoItem and the entire GList.
Attachment #263429 - Flags: superreview?(vladimir)
Attachment #263429 - Flags: review?(vladimir)
A separate patch for similar leaks in gfxPangoFont::GetMetrics.

I assume the early return paths in GetSize and GetMetrics are not meant to be
hit?

Attachment 263238 [details] [diff] in bug 357637 removes the calls to pango_itemize in GetSize
GetMetrics so I include this patch separately as it won't be needed if the
357637 patch is landed.
Comment on attachment 263429 [details] [diff] [review]
patch to CreateGlyphRunsItemizing

r+sr=me
Attachment #263429 - Flags: superreview?(vladimir)
Attachment #263429 - Flags: superreview+
Attachment #263429 - Flags: review?(vladimir)
Attachment #263429 - Flags: review+
Don't we need a pango_item_free() before the 'continue' as well?
Yes, thanks Mats.  Added the extra pango_item_free.
Attachment #263429 - Attachment is obsolete: true
Attachment #263490 - Flags: review?(vladimir)
Comment on attachment 263490 [details] [diff] [review]
patch to CreateGlyphRunsItemizing v2

Whoops, yes
Attachment #263490 - Flags: review?(vladimir) → review+
Whiteboard: [checkin needed]
checked in "patch to CreateGlyphRunsItemizing v2":

Checking in gfxPangoFonts.cpp;
/cvsroot/mozilla/gfx/thebes/src/gfxPangoFonts.cpp,v  <--  gfxPangoFonts.cpp
new revision: 1.70; previous revision: 1.69
done


Is this FIXED or does something need to be done about the other patch?
Whiteboard: [checkin needed]
Target Milestone: --- → mozilla1.9alpha5
Thanks for the checkin.  "patch to CreateGlyphRunsItemizing v2" was the checkin needed.

The remainder will be FIXED by the current patch in bug 357637.
We won't need "patch to GetMetrics" unless there is a problem with the patch in bug 357637.
Depends on: 357637
Fixed with the help of attachment 263898 [details] [diff] [review] in bug 357637 now checked in.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Keywords: mlk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: