From 59f1d37376d20d855d93fae4919bf81995c24281 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 21 Jun 2019 15:17:04 +0200 Subject: NXrender.c: fix possible memory leak --- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nx-X11/programs/Xserver') diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 7456bd3a5..8a288b485 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -715,6 +715,9 @@ ProcRenderTrapezoids (ClientPtr client) { if (pFormat != NULL) { + if (nxagentTrapezoidExtents && nxagentTrapezoidExtents != NullBox) + free(nxagentTrapezoidExtents); + nxagentTrapezoidExtents = (BoxPtr) malloc(sizeof(BoxRec)); miTrapezoidBounds (ntraps, (xTrapezoid *) &stuff[1], nxagentTrapezoidExtents); -- cgit v1.2.3