diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2017-11-18 23:33:53 +0100 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2017-11-21 01:41:57 +0100 |
commit | 7e975e3ccff9aa809c1fec7b2642615f2a934c10 (patch) | |
tree | 87c4b5833476c339d20af4af5bc04e3d1daa7603 /nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | |
parent | 3b640a0f8de615e53dd6801ebd2aa0cf04f76c69 (diff) | |
download | nx-libs-7e975e3ccff9aa809c1fec7b2642615f2a934c10.tar.gz nx-libs-7e975e3ccff9aa809c1fec7b2642615f2a934c10.tar.bz2 nx-libs-7e975e3ccff9aa809c1fec7b2642615f2a934c10.zip |
simply free() calls
free() can handle NULL so there's no need to check this ourselves
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Reconnect.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index cae0a397b..cafa219ec 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -610,12 +610,8 @@ Bool nxagentReconnectSession(void) nxagentXkbState.Initialized = 0; - if (nxagentOldKeyboard != NULL) - { - free(nxagentOldKeyboard); - - nxagentOldKeyboard = NULL; - } + free(nxagentOldKeyboard); + nxagentOldKeyboard = NULL; nxagentInitPointerMap(); @@ -739,12 +735,8 @@ nxagentReconnectError: nxagentDisconnectDisplay(); } - if (nxagentOldKeyboard != NULL) - { - free(nxagentOldKeyboard); - - nxagentOldKeyboard = NULL; - } + free(nxagentOldKeyboard); + nxagentOldKeyboard = NULL; return 0; } |