From 7d3e4328d4f4421178377933ca98fb80daa85c76 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 16 Aug 2012 20:32:11 +0100 Subject: [PATCH] sna/glyphs: Fix potential leak of glyph extents (for many lists of many formats) Reported-by: Zdenek Kabelac Signed-off-by: Chris Wilson --- src/sna/sna_glyphs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index db9af143..8cbe39cd 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -1173,8 +1173,10 @@ glyphs_format(int nlist, GlyphListPtr list, GlyphPtr * glyphs) extents.x2 = 0; extents.y2 = 0; - if (format->format != list->format->format) - return NULL; + if (format->format != list->format->format) { + format = NULL; + goto out; + } x += list->xOff; y += list->yOff;