[X2Go-Commits] [nx-libs] 142/219: Cursor.c: use SAFE_XFree

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:39 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 156533439445173e488d648354a94103f578cfa0
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Jul 22 21:33:54 2019 +0200

    Cursor.c: use SAFE_XFree
---
 nx-X11/programs/Xserver/hw/nxagent/Cursor.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
index a67115cec..75382d4e8 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
@@ -61,6 +61,7 @@ is" without express or implied warranty.
 #include "Events.h"
 #include "Render.h"
 #include "Client.h"
+#include "Utils.h"
 
 #include "windowstr.h"
 #include "resource.h"
@@ -211,7 +212,7 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
   XPutImage(nxagentDisplay, source, nxagentBitmapGC, image,
                 0, 0, 0, 0, pCursor->bits->width, pCursor->bits->height);
 
-  XFree(image);
+  SAFE_XFree(image);
 
   image = XCreateImage(nxagentDisplay,
                        nxagentDefaultVisual(pScreen),
@@ -229,7 +230,7 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
   XPutImage(nxagentDisplay, mask, nxagentBitmapGC, image,
             0, 0, 0, 0, pCursor->bits->width, pCursor->bits->height);
 
-  XFree(image);
+  SAFE_XFree(image);
 
   fg_color.red = pCursor->foreRed;
   fg_color.green = pCursor->foreGreen;
@@ -264,14 +265,12 @@ Bool nxagentUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
   if (nxagentCursorUsesRender(pCursor, pScreen))
   {
     PicturePtr pPicture = nxagentCursorPicture(pCursor, pScreen);
-
     FreePicture(pPicture, pPicture -> id);
   }
 
   if (nxagentCursor(pCursor, pScreen) != None)
   {
     XFreeCursor(nxagentDisplay, nxagentCursor(pCursor, pScreen));
-
     nxagentCursor(pCursor, pScreen) = None;
   }
 

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