[X2Go-Commits] [nx-libs] 145/219: Pixmap.c: use SAFE_free

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:40 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 8b74ff1c11f42943fbfdf247446676536d16f480
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Jul 22 21:45:25 2019 +0200

    Pixmap.c: use SAFE_free
---
 nx-X11/programs/Xserver/hw/nxagent/Pixmap.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
index 653426ebb..58fea6c05 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
@@ -49,6 +49,7 @@
 #include "Events.h"
 #include "Holder.h"
 #include "Args.h"
+#include "Utils.h"
 
 #include "compext/Compext.h"
 #include <nx/NXpack.h>
@@ -501,7 +502,7 @@ Bool nxagentDestroyPixmap(PixmapPtr pPixmap)
     FreeResource(pPixmapPriv -> mid, RT_NONE);
   }
 
-  free(pPixmap);
+  SAFE_free(pPixmap);
 
   return True;
 }
@@ -1092,7 +1093,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
     {
       FatalError("XGetImage: Failed.\n");
 
-      free(data);
+      SAFE_free(data);
 
       return False;
     }
@@ -1168,7 +1169,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap)
       XDestroyImage(image);
     }
 
-    free(data);
+    SAFE_free(data);
   }
   else
   {
@@ -1265,7 +1266,7 @@ void nxagentSynchronizeShmPixmap(DrawablePtr pDrawable, int xPict, int yPict,
       nxagentPutImage(pDrawable, pGC, depth, xPict, yPict,
                           width, height, 0, format, data);
 
-      free(data);
+      SAFE_free(data);
     }
     #ifdef WARNING
     else
@@ -1413,7 +1414,7 @@ FIXME: If the pixmap has a different depth from the window, the
     fprintf(stderr, "nxagentPixmapOnShadowDisplay: XCreateImage failed.\n");
     #endif
 
-    free(data);
+    SAFE_free(data);
 
     return False;
   }
@@ -1572,7 +1573,7 @@ Bool nxagentFbOnShadowDisplay(void)
     fprintf(stderr, "nxagentFbOnShadowDisplay: XCreateImage failed.\n");
     #endif
 
-    free(data);
+    SAFE_free(data);
 
     return False;
   }

--
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