[cairo-bugs] [Bug 21711] New: unnecessary code in _cairo_ft_unscaled_font_map_destroy

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue May 12 15:55:27 PDT 2009


http://bugs.freedesktop.org/show_bug.cgi?id=21711

           Summary: unnecessary code in _cairo_ft_unscaled_font_map_destroy
           Product: cairo
           Version: 1.9.1
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: freetype font backend
        AssignedTo: david at freetype.org
        ReportedBy: bugs.freedesktop at karlt.net
         QAContact: cairo-bugs at cairographics.org


_cairo_ft_unscaled_font_map_destroy is called from
_cairo_ft_font_reset_static_data.

It calls _cairo_ft_unscaled_font_map_pluck_entry on each entry in the hash
table, but there should not be any unscaled_fonts in the hash table at this
stage, as they are removed when their last reference is removed.

Even if there were some unscaled_fonts in the hash table, freeing the
unscaled_font while it has references seems a bit strange, and
_cairo_ft_unscaled_font_map_pluck_entry does not do all the destruction that
_cairo_unscaled_font_destroy would do when the last reference is released.

I think it would probably be best to skip
_cairo_ft_unscaled_font_map_pluck_entry and just call_cairo_hash_table_destroy
which will assert that the hash table has no live entries.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the cairo-bugs mailing list