aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2019-07-22 21:33:54 +0200
committerUlrich Sibiller <uli42@gmx.de>2019-08-06 21:57:32 +0200
commit156533439445173e488d648354a94103f578cfa0 (patch)
treeaf3368718ebd19afddcd6ee63d86006fe3044404 /nx-X11
parentd0a6c98cb2465203e852f466127442cd79dc2662 (diff)
downloadnx-libs-156533439445173e488d648354a94103f578cfa0.tar.gz
nx-libs-156533439445173e488d648354a94103f578cfa0.tar.bz2
nx-libs-156533439445173e488d648354a94103f578cfa0.zip
Cursor.c: use SAFE_XFree
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.c7
1 files 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;
}