aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-04-09 19:10:00 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2020-05-07 14:58:17 +0200
commit13536693d89077daa3cde370bb43decbf24ec212 (patch)
tree5563d38029a33122c481ccf426d3728af1b7307c /nx-X11
parent99f541c1e4499ff8fda65c67c2038d5b65c15e67 (diff)
downloadnx-libs-13536693d89077daa3cde370bb43decbf24ec212.tar.gz
nx-libs-13536693d89077daa3cde370bb43decbf24ec212.tar.bz2
nx-libs-13536693d89077daa3cde370bb43decbf24ec212.zip
NXdispatch.c: free font data on exit
helps to avoid valgrind warnings
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Font.c9
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Font.h1
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c1
3 files changed, 10 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 200a6fa61..dcbd6949a 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c
@@ -102,7 +102,6 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
static XFontStruct *nxagentLoadQueryFont(register Display *dpy , char *fontName , FontPtr pFont);
int nxagentFreeFont(XFontStruct *fs);
static Bool nxagentGetFontServerPath(char * fontServerPath, int size);
-
static char * nxagentMakeScalableFontName(const char *fontName, int scalableResolution);
RESTYPE RT_NX_FONT;
@@ -158,6 +157,14 @@ static struct _nxagentFailedToReconnectFonts
int index;
} nxagentFailedToReconnectFonts = {NULL, NULL, 0, 0};
+static void nxagentFreeRemoteFontList(nxagentFontList *listRec);
+
+void nxagentFreeFontData(void)
+{
+ nxagentFreeFontCache();
+ nxagentFreeRemoteFontList(&nxagentRemoteFontList);
+}
+
/*
* This is used if nxagentFullGeneration is true in CloseDisplay().
*/
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.h b/nx-X11/programs/Xserver/hw/nxagent/Font.h
index c5b236562..a8eae6554 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.h
@@ -82,4 +82,5 @@ void nxagentVerifyDefaultFontPath(void);
int nxagentSplitString(char *string, char *fields[], int nfields, char *sep);
+void nxagentFreeFontData(void);
#endif /* __Font_H__ */
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
index 5315f86bc..8f806093e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
@@ -581,6 +581,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
saveAgentState("TERMINATED");
nxagentFreeAtomMap();
+ nxagentFreeFontData();
#endif /* NXAGENT_SERVER */
KillAllClients();