From b01e29efffafe9f426eb88ba400e2fa24de548aa Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 29 Oct 2018 23:39:03 +0100 Subject: xkb: Don't check for NULL before calling free Author: Pauli Nieminen Date: Thu Jul 22 11:34:54 2010 +0300 xkb: Don't check for NULL before calling free Signed-off-by: Pauli Nieminen Reviewed-by: Peter Hutterer Backported-to-NX-by: Ulrich Sibiller --- nx-X11/programs/Xserver/xkb/ddxList.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'nx-X11') diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c index e751b6b24..5466cff37 100644 --- a/nx-X11/programs/Xserver/xkb/ddxList.c +++ b/nx-X11/programs/Xserver/xkb/ddxList.c @@ -209,8 +209,7 @@ char tmpname[PATH_MAX]; } if (!in) { - if (buf != NULL) - free (buf); + free (buf); #ifdef WIN32 unlink(tmpname); #endif @@ -276,8 +275,7 @@ char tmpname[PATH_MAX]; fclose(in); unlink(tmpname); #endif - if (buf != NULL) - free (buf); + free (buf); return status; } -- cgit v1.2.3