[X2Go-Commits] [nx-libs] 152/219: GC.c: use SAFE_free

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:43 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 6378d5ade724a43fb21a38f843f2496a367e517f
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Jul 22 22:24:37 2019 +0200

    GC.c: use SAFE_free
---
 nx-X11/programs/Xserver/hw/nxagent/GC.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/GC.c b/nx-X11/programs/Xserver/hw/nxagent/GC.c
index 2fac2f100..df9c4ad0a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/GC.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/GC.c
@@ -61,6 +61,7 @@ is" without express or implied warranty.
 #include "Trap.h"
 #include "Screen.h"
 #include "Pixels.h"
+#include "Utils.h"
 
 #include "../../fb/fb.h"
 
@@ -694,7 +695,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
 
         XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y,
                                pRects, nRects, Unsorted);
-        free((char *) pRects);
+        SAFE_free(pRects);
       }
 
       break;
@@ -778,7 +779,7 @@ void nxagentChangeClip(GCPtr pGC, int type, void * pValue, int nRects)
 
       pGC->clientClip = (void *) RegionFromRects(nRects,
                                                   (xRectangle *)pValue, type);
-      free(pValue);
+      SAFE_free(pValue);
 
       pValue = pGC->clientClip;
 
@@ -912,9 +913,8 @@ static void nxagentFreeGCRec(struct nxagentGCRec *t)
               (void *) t, (void *) t -> gc);
   #endif
 
-  free(t -> gc);
-
-  free(t);
+  SAFE_free(t -> gc);
+  SAFE_free(t);
 }
 
 static void nxagentRestoreGCRec(struct nxagentGCRec *t)
@@ -924,11 +924,11 @@ static void nxagentRestoreGCRec(struct nxagentGCRec *t)
               (void*)t, (void*)t -> gc);
   #endif
 
-  free(nxagentGC(t -> pGC));
+  SAFE_free(nxagentGC(t -> pGC));
 
   nxagentGC(t -> pGC) = t -> gc;
 
-  free(t);
+  SAFE_free(t);
 }
 
 static void nxagentAddGCToList(GCPtr pGC)
@@ -1303,7 +1303,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
 
         XSetClipRectangles(nxagentDisplay, nxagentGC(pGC), pGC -> clipOrg.x, pGC -> clipOrg.y,
                            pRects, nRects, Unsorted);
-        free((char *) pRects);
+        SAFE_free(pRects);
       }
       else
       {
@@ -1374,7 +1374,7 @@ static void nxagentReconnectClip(GCPtr pGC, int type, void * pValue, int nRects)
 
       pGC->clientClip = (void *) RegionFromRects(nRects,
                                                   (xRectangle *)pValue, type);
-      free(pValue);
+      SAFE_free(pValue);
       pValue = pGC->clientClip;
       type = CT_REGION;
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list