[X2Go-Commits] [nx-libs] 22/29: Font.c: free possibly allocated mem

git-admin at x2go.org git-admin at x2go.org
Sun Jan 7 01:31:00 CET 2018


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch 3.6.x
in repository nx-libs.

commit 054ae844758a306df4aacd40c46780195853a8f8
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Wed Jan 3 01:17:59 2018 +0100

    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(+)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 540ad79..197f0c8 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");
     }
 

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/nx-libs.git


More information about the x2go-commits mailing list