[PATCH 59/72] drm/intel: fix font cleanup

"Enrico Weigelt, metux IT consult" <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
Note: the function _cairo_scaled_font_revoke_ownership() doesn't
exist anymore, so guessing the call is obsoleted.

Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
---
 src/drm/cairo-drm-intel.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c
index e3af63f..a5a8dec 100644
--- a/src/drm/cairo-drm-intel.c
+++ b/src/drm/cairo-drm-intel.c
@@ -737,16 +737,16 @@ _intel_glyph_cache_fini (intel_device_t *device, intel_buffer_cache_t *cache)
 void
 intel_device_fini (intel_device_t *device)
 {
-    cairo_scaled_font_t *scaled_font, *next_scaled_font;
     int n;
 
-    cairo_list_foreach_entry_safe (scaled_font,
-				   next_scaled_font,
-				   cairo_scaled_font_t,
-				   &device->fonts,
-				   link)
-    {
-	_cairo_scaled_font_revoke_ownership (scaled_font);
+    while (! cairo_list_is_empty (&device->fonts)) {
+	cairo_scaled_font_t *font = cairo_list_first_entry (
+	    &device->fonts,
+	    cairo_scaled_font_t,
+	    link);
+
+	cairo_list_del (&font->link);
+	free (font);
     }
 
     for (n = 0; n < ARRAY_LENGTH (device->glyph_cache); n++)
-- 
2.6.4.442.g545299f

-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.