diff options
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Atoms.c')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Atoms.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c index eecead6e1..2e144bb0c 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Atoms.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Atoms.c @@ -364,7 +364,7 @@ int nxagentQueryAtoms(ScreenPtr pScreen) typedef struct { Atom local; XlibAtom remote; - const char *string; + char *string; int length; } AtomMap; @@ -397,7 +397,7 @@ static void nxagentExpandCache(void) static void nxagentWriteAtom(Atom local, XlibAtom remote, const char *string) { - const char *s = strdup(string); + char *s = strdup(string); #ifdef WARNING if (s == NULL) @@ -436,6 +436,17 @@ void nxagentResetAtomMap(void) nxagentPrintAtomMapInfo("nxagentResetAtomMap: Exiting"); } +void nxagentFreeAtomMap(void) +{ + for (unsigned int i = 0; i < privLastAtom; i++) + { + SAFE_free(privAtomMap[i].string); + } + + SAFE_free(privAtomMap); + privLastAtom = privAtomMapSize = 0; +} + /* * Init map. * Initializing the atomNameList all in one. |