diff options
author | marha <marha@users.sourceforge.net> | 2011-04-05 09:51:44 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-05 09:51:44 +0000 |
commit | eaedc21febeadad4cf0e370f5d97e7bdb4470870 (patch) | |
tree | 64e879d8b191f767650e3f4793160a68b0121e4f /xorg-server/render/render.c | |
parent | 5d8e1ad0cd01de0bd0b43dc916c1d39fd293e79d (diff) | |
download | vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.tar.gz vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.tar.bz2 vcxsrv-eaedc21febeadad4cf0e370f5d97e7bdb4470870.zip |
xserver xkeyboard-config libxcb xkbcomp mesa git update 5 Apr 2011
Diffstat (limited to 'xorg-server/render/render.c')
-rw-r--r-- | xorg-server/render/render.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/xorg-server/render/render.c b/xorg-server/render/render.c index 8ff8ee6f6..c5da6d78f 100644 --- a/xorg-server/render/render.c +++ b/xorg-server/render/render.c @@ -1372,8 +1372,10 @@ ProcRenderCompositeGlyphs (ClientPtr client) else { listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec)); - if (!listsBase) - return BadAlloc; + if (!listsBase) { + rc = BadAlloc; + goto bail; + } } buffer = (CARD8 *) (stuff + 1); glyphs = glyphsBase; @@ -1392,13 +1394,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) GlyphSetType, client, DixUseAccess); if (rc != Success) - { - if (glyphsBase != glyphsLocal) - free(glyphsBase); - if (listsBase != listsLocal) - free(listsBase); - return rc; - } + goto bail; } buffer += 4; } @@ -1436,8 +1432,10 @@ ProcRenderCompositeGlyphs (ClientPtr client) lists++; } } - if (buffer > end) - return BadLength; + if (buffer > end) { + rc = BadLength; + goto bail; + } CompositeGlyphs (stuff->op, pSrc, @@ -1448,13 +1446,14 @@ ProcRenderCompositeGlyphs (ClientPtr client) nlist, listsBase, glyphsBase); + rc = Success; +bail: if (glyphsBase != glyphsLocal) free(glyphsBase); if (listsBase != listsLocal) free(listsBase); - - return Success; + return rc; } static int |