From dfd4d41ac99dbe5d8ea16aa4ce4809b66308c803 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 9 May 2007 12:30:40 +0100 Subject: [PATCH] [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. --- src/cairo-xlib-surface.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cairo-xlib-surface.c b/src/cairo-xlib-surface.c index 9dbe8cf06..19227b895 100644 --- a/src/cairo-xlib-surface.c +++ b/src/cairo-xlib-surface.c @@ -2521,7 +2521,10 @@ _cairo_xlib_surface_scaled_glyph_fini (cairo_scaled_glyph_t *scaled_glyph, (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);