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/Pixmap.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'nx-X11/programs/Xserver/hw/nxagent/Pixmap.c') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c index be5408d13..853621709 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Pixmap.c @@ -1172,10 +1172,7 @@ Bool nxagentCheckPixmapIntegrity(PixmapPtr pPixmap) XDestroyImage(image); } - if (data != NULL) - { - free(data); - } + free(data); } else { @@ -1421,10 +1418,7 @@ FIXME: If the pixmap has a different depth from the window, the fprintf(stderr, "nxagentPixmapOnShadowDisplay: XCreateImage failed.\n"); #endif - if (data != NULL) - { - free(data); - } + free(data); return False; } @@ -1583,10 +1577,7 @@ Bool nxagentFbOnShadowDisplay() fprintf(stderr, "nxagentFbOnShadowDisplay: XCreateImage failed.\n"); #endif - if (data) - { - free(data); - } + free(data); return False; } -- cgit v1.2.3