From 57f63f4c9dae73997ff93e940c608c7f0cc77664 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Fri, 31 May 2019 21:22:03 +0200 Subject: [PATCH] NXrender.c: fix possible memory leak --- nx-X11/programs/Xserver/hw/nxagent/NXrender.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c index 79dd18c2ce..093dc33df4 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXrender.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXrender.c @@ -741,7 +741,8 @@ ProcRenderTrapezoids (ClientPtr client) { if (pFormat != NULL) { - /* FIXME: free if != NullBox? */ + if (nxagentTrapezoidExtents && nxagentTrapezoidExtents != NullBox) + free(nxagentTrapezoidExtents); nxagentTrapezoidExtents = (BoxPtr) malloc(sizeof(BoxRec)); miTrapezoidBounds (ntraps, (xTrapezoid *) &stuff[1], nxagentTrapezoidExtents); }