[X2Go-Commits] [nx-libs] 144/219: Reconnect.c: use SAFE_free

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:40 CEST 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 34bd0942baf5fedc038ded7507b130446edd611a
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Mon Jul 22 21:44:25 2019 +0200

    Reconnect.c: use SAFE_free
---
 nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 12 +++++-------
 1 file 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;
 }

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list