From 156533439445173e488d648354a94103f578cfa0 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 22 Jul 2019 21:33:54 +0200 Subject: Cursor.c: use SAFE_XFree --- nx-X11/programs/Xserver/hw/nxagent/Cursor.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'nx-X11') 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; } -- cgit v1.2.3