From 054ae844758a306df4aacd40c46780195853a8f8 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Wed, 3 Jan 2018 01:17:59 +0100 Subject: Font.c: free possibly allocated mem even if we issue a FatalError afterwards --- nx-X11/programs/Xserver/hw/nxagent/Font.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'nx-X11/programs') diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c index 540ad79e2..197f0c84a 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Font.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c @@ -916,6 +916,11 @@ static void nxagentCollectFailedFont(FontPtr fpt, XID id) if (nxagentFailedToReconnectFonts.font == NULL || nxagentFailedToReconnectFonts.id == NULL) { + free(nxagentFailedToReconnectFonts.font); + nxagentFailedToReconnectFonts.font = NULL; + free(nxagentFailedToReconnectFonts.id); + nxagentFailedToReconnectFonts.id = NULL; + FatalError("Font: font not reconnected memory allocation failed!.\n"); } -- cgit v1.2.3