[cairo-commit] src/cairo-scaled-font.c
Chris Wilson
ickle at kemper.freedesktop.org
Thu Jun 7 07:17:05 PDT 2012
src/cairo-scaled-font.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 37532b47c0ef6528fb6696fe97be337d9ad0a900
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Jun 7 15:14:31 2012 +0100
scaled-font: Take lock around disposing of an empty page upon alloc failure
Spotted by code inspection whilst looking at #50705
References: https://bugs.freedesktop.org/show_bug.cgi?id=50705
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 7ea3a21..fe22f54 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2870,8 +2870,10 @@ _cairo_scaled_font_free_last_glyph (cairo_scaled_font_t *scaled_font,
_cairo_scaled_glyph_fini (scaled_font, scaled_glyph);
if (--page->num_glyphs == 0) {
+ CAIRO_MUTEX_LOCK (_cairo_scaled_glyph_page_cache_mutex);
_cairo_cache_remove (&cairo_scaled_glyph_page_cache,
&page->cache_entry);
+ CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex);
}
}
More information about the cairo-commit
mailing list