diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-07-22 21:44:25 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2019-08-06 21:57:32 +0200 |
commit | 34bd0942baf5fedc038ded7507b130446edd611a (patch) | |
tree | 44b633d4fcf79481d5f63c45b17be78526aa6980 /nx-X11/programs/Xserver | |
parent | fd4fa4e9646bb3f5a9091dc571b158a861b6127e (diff) | |
download | nx-libs-34bd0942baf5fedc038ded7507b130446edd611a.tar.gz nx-libs-34bd0942baf5fedc038ded7507b130446edd611a.tar.bz2 nx-libs-34bd0942baf5fedc038ded7507b130446edd611a.zip |
Reconnect.c: use SAFE_free
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index b78c01e30..47f636316 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -53,6 +53,7 @@ #include "Splash.h" #include "Error.h" #include "Keystroke.h" +#include "Utils.h" #ifdef XKB #include "XKBsrv.h" @@ -448,8 +449,7 @@ Bool nxagentReconnectSession(void) return 0; } - free(nxagentKeyboard); - nxagentKeyboard = NULL; + SAFE_free(nxagentKeyboard); } nxagentSaveOptions(); @@ -464,7 +464,7 @@ Bool nxagentReconnectSession(void) fprintf(stderr, "nxagentReconnect: changing nxagentKeyboard from [null/null] to [clone].\n"); #endif - free(nxagentKeyboard); + SAFE_free(nxagentKeyboard); nxagentKeyboard = strdup("clone"); } @@ -635,8 +635,7 @@ Bool nxagentReconnectSession(void) nxagentXkbState.Initialized = 0; - free(nxagentOldKeyboard); - nxagentOldKeyboard = NULL; + SAFE_free(nxagentOldKeyboard); nxagentInitPointerMap(); @@ -760,8 +759,7 @@ nxagentReconnectError: nxagentDisconnectDisplay(); } - free(nxagentOldKeyboard); - nxagentOldKeyboard = NULL; + SAFE_free(nxagentOldKeyboard); return 0; } |