Commit 4421f787 authored by Ulrich Sibiller's avatar Ulrich Sibiller

Atoms.c: use SAFE_XFree and SAFE_free macros

parent 7d25771d
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "Screen.h" #include "Screen.h"
#include "Options.h" #include "Options.h"
#include "Agent.h" #include "Agent.h"
#include "Utils.h"
/* /*
* Set here the required log level. * Set here the required log level.
...@@ -53,11 +54,6 @@ ...@@ -53,11 +54,6 @@
#undef TEST #undef TEST
#undef DEBUG #undef DEBUG
#ifdef DEBUG
/* for validateString() */
#include "Utils.h"
#endif
/* /*
* These values should be moved in * These values should be moved in
* the option repository. * the option repository.
...@@ -482,8 +478,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet) ...@@ -482,8 +478,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet)
fprintf(stderr, "nxagentInitAtomMap: WARNING! XInternAtoms request failed.\n"); fprintf(stderr, "nxagentInitAtomMap: WARNING! XInternAtoms request failed.\n");
#endif #endif
free(atom_list); SAFE_free(atom_list);
free(name_list); SAFE_free(name_list);
return 0; return 0;
} }
...@@ -523,8 +519,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet) ...@@ -523,8 +519,8 @@ static int nxagentInitAtomMap(char **atomNameList, int count, Atom *atomsRet)
} }
} }
free(atom_list); SAFE_free(atom_list);
free(name_list); SAFE_free(name_list);
nxagentPrintAtomMapInfo("nxagentInitAtomMap: Exiting"); nxagentPrintAtomMapInfo("nxagentInitAtomMap: Exiting");
...@@ -794,7 +790,7 @@ Atom nxagentRemoteToLocalAtom(Atom remote) ...@@ -794,7 +790,7 @@ Atom nxagentRemoteToLocalAtom(Atom remote)
#ifdef TEST #ifdef TEST
fprintf(stderr, "%s: remote [%d (%s)] -> local [%d]\n", __func__, remote, string, local); fprintf(stderr, "%s: remote [%d (%s)] -> local [%d]\n", __func__, remote, string, local);
#endif #endif
XFree(string); SAFE_XFree(string);
return local; return local;
} }
......
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