aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/render
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/render')
-rw-r--r--nx-X11/programs/Xserver/render/render.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/render/render.c b/nx-X11/programs/Xserver/render/render.c
index e4d8a3f76..f0bc6a1c9 100644
--- a/nx-X11/programs/Xserver/render/render.c
+++ b/nx-X11/programs/Xserver/render/render.c
@@ -1347,9 +1347,8 @@ ProcRenderCompositeGlyphs (ClientPtr client)
listsBase = (GlyphListPtr) malloc (nlist * sizeof (GlyphListRec));
if (!listsBase)
{
- free(glyphsBase);
- free(listsBase);
-
+ if (glyphsBase != glyphsLocal)
+ free(glyphsBase);
return BadAlloc;
}
}
@@ -1417,8 +1416,13 @@ ProcRenderCompositeGlyphs (ClientPtr client)
}
}
if (buffer > end)
+ {
+ if (glyphsBase != glyphsLocal)
+ free(glyphsBase);
+ if (listsBase != listsLocal)
+ free(listsBase);
return BadLength;
-
+ }
CompositeGlyphs (stuff->op,
pSrc,
pDst,