Commit 34bd0942 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Reconnect.c: use SAFE_free

parent fd4fa4e9
...@@ -53,6 +53,7 @@ ...@@ -53,6 +53,7 @@
#include "Splash.h" #include "Splash.h"
#include "Error.h" #include "Error.h"
#include "Keystroke.h" #include "Keystroke.h"
#include "Utils.h"
#ifdef XKB #ifdef XKB
#include "XKBsrv.h" #include "XKBsrv.h"
...@@ -448,8 +449,7 @@ Bool nxagentReconnectSession(void) ...@@ -448,8 +449,7 @@ Bool nxagentReconnectSession(void)
return 0; return 0;
} }
free(nxagentKeyboard); SAFE_free(nxagentKeyboard);
nxagentKeyboard = NULL;
} }
nxagentSaveOptions(); nxagentSaveOptions();
...@@ -464,7 +464,7 @@ Bool nxagentReconnectSession(void) ...@@ -464,7 +464,7 @@ Bool nxagentReconnectSession(void)
fprintf(stderr, "nxagentReconnect: changing nxagentKeyboard from [null/null] to [clone].\n"); fprintf(stderr, "nxagentReconnect: changing nxagentKeyboard from [null/null] to [clone].\n");
#endif #endif
free(nxagentKeyboard); SAFE_free(nxagentKeyboard);
nxagentKeyboard = strdup("clone"); nxagentKeyboard = strdup("clone");
} }
...@@ -635,8 +635,7 @@ Bool nxagentReconnectSession(void) ...@@ -635,8 +635,7 @@ Bool nxagentReconnectSession(void)
nxagentXkbState.Initialized = 0; nxagentXkbState.Initialized = 0;
free(nxagentOldKeyboard); SAFE_free(nxagentOldKeyboard);
nxagentOldKeyboard = NULL;
nxagentInitPointerMap(); nxagentInitPointerMap();
...@@ -760,8 +759,7 @@ nxagentReconnectError: ...@@ -760,8 +759,7 @@ nxagentReconnectError:
nxagentDisconnectDisplay(); nxagentDisconnectDisplay();
} }
free(nxagentOldKeyboard); SAFE_free(nxagentOldKeyboard);
nxagentOldKeyboard = NULL;
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment