[cairo-commit] src/cairo-ft-font.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Aug 16 04:24:53 PDT 2007


 src/cairo-ft-font.c |    1 +
 1 files changed, 1 insertion(+)

New commits:
diff-tree bc635da45a32eb9b7aff6fa5f7f560ebf99092a8 (from 8881265cca73790a49068b3bab5362cb73f8deb6)
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Aug 16 12:21:49 2007 +0100

    [cairo-ft-font] Decrement lock count on error.
    
    As noted in http://bugs.freedesktop.org/show_bug.cgi?id=12026 the error
    path of _cairo_ft_unscaled_font_lock_face() failed to reset the
    unscaled->lock_count before releasing the mutex and returning NULL.

diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
index 4dc61ee..04441d0 100644
--- a/src/cairo-ft-font.c
+++ b/src/cairo-ft-font.c
@@ -552,6 +552,7 @@ _cairo_ft_unscaled_font_lock_face (cairo
 		     unscaled->id,
 		     &face) != FT_Err_Ok)
     {
+	unscaled->lock_count--;
 	CAIRO_MUTEX_UNLOCK (unscaled->mutex);
 	_cairo_error (CAIRO_STATUS_NO_MEMORY);
 	return NULL;


More information about the cairo-commit mailing list