sna/glyphs: Fix potential leak of glyph extents (for many lists of many formats)

Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-08-16 20:32:11 +01:00
parent 9b00c82df7
commit 7d3e4328d4
1 changed files with 4 additions and 2 deletions

View File

@ -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;