diff options
author | marha <marha@users.sourceforge.net> | 2011-04-05 14:52:19 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-04-05 14:52:19 +0000 |
commit | 6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6 (patch) | |
tree | 02e0d5fd297602d526b582dc527e007fe20a326f /xorg-server/render/render.c | |
parent | 1d142834bdb30308784a0654a39b7c0de7e37695 (diff) | |
parent | eaedc21febeadad4cf0e370f5d97e7bdb4470870 (diff) | |
download | vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.gz vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.tar.bz2 vcxsrv-6254e74e8b2ff8a2a1e8476a3300a7bdd65b7ad6.zip |
svn merge ^/branches/released .
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 3f013439c..5ba661da0 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
|