[X2Go-Commits] [nx-libs] 155/219: Atoms.c: use SAFE_XFree and SAFE_free macros

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:44 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 4421f787ddf102889ee65cd310cc50369540dbc8
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Tue Jul 23 20:10:43 2019 +0200

    Atoms.c: use SAFE_XFree and SAFE_free macros
---
 nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
index c36c38e2f..2ee67b9bb 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c
@@ -43,6 +43,7 @@
 #include "Screen.h"
 #include "Options.h"
 #include "Agent.h"
+#include "Utils.h"
 
 /*
  * Set here the required log level.
@@ -53,11 +54,6 @@
 #undef  TEST
 #undef  DEBUG
 
-#ifdef DEBUG
-/* for validateString() */
-#include "Utils.h"
-#endif
-
 /*
  * These values should be moved in
  * the option repository.
@@ -482,8 +478,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet)
     fprintf(stderr, "nxagentInitAtomMap: WARNING! XInternAtoms request failed.\n");
     #endif
 
-    free(atom_list);
-    free(name_list);
+    SAFE_free(atom_list);
+    SAFE_free(name_list);
 
     return 0;
   }
@@ -523,8 +519,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet)
     }
   }
 
-  free(atom_list);
-  free(name_list);
+  SAFE_free(atom_list);
+  SAFE_free(name_list);
 
   nxagentPrintAtomMapInfo("nxagentInitAtomMap: Exiting");
 
@@ -794,7 +790,7 @@ Atom nxagentRemoteToLocalAtom(Atom remote)
     #ifdef TEST
     fprintf(stderr, "%s: remote [%d (%s)] -> local [%d]\n", __func__, remote, string, local);
     #endif
-    XFree(string);
+    SAFE_XFree(string);
 
     return local;
   }

--
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