[cairo-commit] src/cairo-scaled-font.c
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Oct 21 11:42:11 UTC 2020
src/cairo-scaled-font.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
New commits:
commit a67735010dd7576fac7d5e30e0933a3be313b75e
Author: Michal Sudolsky <michal at sudolio.com>
Date: Tue Jul 21 20:02:24 2020 +0200
fix double free and failed assertions in cairo_scaled_font_destroy
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
old mode 100644
new mode 100755
index 8dff57d95..d53915fee
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -1320,15 +1320,15 @@ cairo_scaled_font_destroy (cairo_scaled_font_t *scaled_font)
assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&scaled_font->ref_count));
+ font_map = _cairo_scaled_font_map_lock ();
+ assert (font_map != NULL);
+
if (! _cairo_reference_count_dec_and_test (&scaled_font->ref_count))
- return;
+ goto unlock;
assert (! scaled_font->cache_frozen);
assert (! scaled_font->global_cache_frozen);
- font_map = _cairo_scaled_font_map_lock ();
- assert (font_map != NULL);
-
/* Another thread may have resurrected the font whilst we waited */
if (! CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&scaled_font->ref_count)) {
if (! scaled_font->placeholder &&
More information about the cairo-commit
mailing list