[cairo-commit] src/cairo-xlib-surface.c

Chris Wilson ickle at kemper.freedesktop.org
Wed May 9 14:58:34 EEST 2007


 src/cairo-xlib-surface.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

New commits:
diff-tree dfd4d41ac99dbe5d8ea16aa4ce4809b66308c803 (from 8ddfc1b2e4aeefb704e05e64661b5c9985788e99)
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed May 9 12:30:40 2007 +0100

    [cairo-xlib-surface] Free the allocation if we fail to queue the work.
    
    Avoid the leak of the allocated argument if we fail to queue the work to
    free the glyph.

diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c
index 9dbe8cf..19227b8 100644
--- a/src/cairo-xlib-surface.c
+++ b/src/cairo-xlib-surface.c
@@ -2521,7 +2521,10 @@ _cairo_xlib_surface_scaled_glyph_fini (c
 			(cairo_xlib_notify_func) _cairo_xlib_render_free_glyphs,
 			arg,
 			free);
-		(void) status; /* XXX cannot propagate failure */
+		if (status) {
+		    /* XXX cannot propagate failure */
+		    free (arg);
+		}
 	    }
 
 	    _cairo_xlib_display_destroy (display);


More information about the cairo-commit mailing list