diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2020-01-07 21:27:04 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-05-07 12:55:04 +0200 |
commit | 66eea14c241cf0aebeccfb0d1f0d98e7dcbf4b73 (patch) | |
tree | d680d891956ffac3a79a9f465145f5e940c62c94 /nx-X11/programs/Xserver/hw/nxagent/Atoms.c | |
parent | 18439f55a04501b93fe8617850b5c1510b0d4885 (diff) | |
download | nx-libs-66eea14c241cf0aebeccfb0d1f0d98e7dcbf4b73.tar.gz nx-libs-66eea14c241cf0aebeccfb0d1f0d98e7dcbf4b73.tar.bz2 nx-libs-66eea14c241cf0aebeccfb0d1f0d98e7dcbf4b73.zip |
nxagent: Free atom map on termination
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. |