Closed Bug 1082167 Opened 12 years ago Closed 12 years ago

|gfxFontEntry::InputsForOpenTypeFeature| leaks |featurelookups|

Categories

(Core :: Graphics: Text, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: erahm, Assigned: jtd)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: [MemShrink:P2][CID 1244635])

Attachments

(1 file)

The portion of |gfxFontEntry::InputsForOpenTypeFeature| that allocates |featurelookups| [1] never assigns or frees it. [1] http://hg.mozilla.org/mozilla-central/annotate/71edd80236b2/gfx/thebes/gfxFontEntry.cpp#l988 Coverity breakdown: > 9. alloc_fn: Storage is returned from allocation function hb_set_create. [show details] > > 10. var_assign: Assigning: featurelookups = storage returned from hb_set_create(). > 991 hb_set_t *featurelookups = hb_set_create(); > > 11. noescape: Resource featurelookups is not freed or pointed-to in hb_ot_layout_collect_lookups. [show details] > 992 hb_ot_layout_collect_lookups(face, kGSUB, scriptTags, nullptr, > 993 features, featurelookups); > 994 hb_codepoint_t index = -1; > > 12. noescape: Resource featurelookups is not freed or pointed-to in hb_set_next. [show details] > > 13. Condition hb_set_next(featurelookups, &index), taking false branch > 995 while (hb_set_next(featurelookups, &index)) { > 996 hb_ot_layout_lookup_collect_glyphs(face, kGSUB, index, > 997 nullptr, inputGlyphs, > 998 nullptr, nullptr); > 999 } > > CID 1244635 (#1 of 1): Resource leak (RESOURCE_LEAK)14. leaked_storage: Variable featurelookups going out of scope leaks the storage it points to.
Assignee: nobody → jdaggett
Attachment #8504430 - Flags: review?(jfkthame)
Attachment #8504430 - Flags: review?(jfkthame) → review+
Whiteboard: [MemShrink][CID 1244635] → [MemShrink:P2][CID 1244635]
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: