diff options
Diffstat (limited to 'render/render.c')
-rw-r--r-- | render/render.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/render/render.c b/render/render.c index 8ff8ee6f6..c5da6d78f 100644 --- a/render/render.c +++ b/render/render.c @@ -1374,4 +1374,6 @@ ProcRenderCompositeGlyphs (ClientPtr client) listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec)); - if (!listsBase) - return BadAlloc; + if (!listsBase) { + rc = BadAlloc; + goto bail; + } } @@ -1394,9 +1396,3 @@ ProcRenderCompositeGlyphs (ClientPtr client) if (rc != Success) - { - if (glyphsBase != glyphsLocal) - free(glyphsBase); - if (listsBase != listsLocal) - free(listsBase); - return rc; - } + goto bail; } @@ -1438,4 +1434,6 @@ ProcRenderCompositeGlyphs (ClientPtr client) } - if (buffer > end) - return BadLength; + if (buffer > end) { + rc = BadLength; + goto bail; + } @@ -1450,3 +1448,5 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphsBase); + rc = Success; +bail: if (glyphsBase != glyphsLocal) @@ -1455,4 +1455,3 @@ ProcRenderCompositeGlyphs (ClientPtr client) free(listsBase); - - return Success; + return rc; } |