From 7e975e3ccff9aa809c1fec7b2642615f2a934c10 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 18 Nov 2017 23:33:53 +0100 Subject: simply free() calls free() can handle NULL so there's no need to check this ourselves --- nx-X11/programs/Xserver/hw/nxagent/Window.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Window.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Window.c b/nx-X11/programs/Xserver/hw/nxagent/Window.c index d58a2516d..2fa6bc136 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Window.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Window.c @@ -3151,12 +3151,7 @@ FIXME: Do we need to set save unders attribute here? &hints); #ifdef _XSERVER64 - - if (data64 != NULL) - { - free(data64); - } - + free(data64); #endif } } @@ -3404,10 +3399,7 @@ Bool nxagentCheckWindowIntegrity(WindowPtr pWin) XDestroyImage(image); } - if (data) - { - free(data); - } + free(data); } else { @@ -3947,11 +3939,8 @@ int nxagentEmptyBSPixmapList() for (i = 0; i < BSPIXMAPLIMIT; i++) { - if (nxagentBSPixmapList[i] != NULL) - { - free(nxagentBSPixmapList[i]); - nxagentBSPixmapList[i] = NULL; - } + free(nxagentBSPixmapList[i]); + nxagentBSPixmapList[i] = NULL; } return 1; -- cgit v1.2.3