Commit 13536693 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXdispatch.c: free font data on exit

helps to avoid valgrind warnings
parent 99f541c1
......@@ -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().
*/
......
......@@ -82,4 +82,5 @@ void nxagentVerifyDefaultFontPath(void);
int nxagentSplitString(char *string, char *fields[], int nfields, char *sep);
void nxagentFreeFontData(void);
#endif /* __Font_H__ */
......@@ -581,6 +581,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio
saveAgentState("TERMINATED");
nxagentFreeAtomMap();
nxagentFreeFontData();
#endif /* NXAGENT_SERVER */
KillAllClients();
......
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