[X2Go-Commits] [nx-libs] 100/219: Keyboard.c: rearrange code to make cppcheck happy

git-admin at x2go.org git-admin at x2go.org
Sat Sep 28 12:10:30 CEST 2019


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 fd7e1f989b757667e7d7a3f0d08c9ee4b21a3a7c
Author: Ulrich Sibiller <uli42 at gmx.de>
Date:   Thu Jun 20 18:52:31 2019 +0200

    Keyboard.c: rearrange code to make cppcheck happy
    
    Otherwise it will (falsely) report "Memory pointed to by 'sessionpath' is freed twice."
---
 nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index b2ae7dfd1..7330784de 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -1696,7 +1696,10 @@ static char* getKeyboardFilePath(void)
       free(sessionpath);
       FatalError("malloc for keyboard file path failed.");
     }
-    free(sessionpath);
+    else
+    {
+      free(sessionpath);
+    }
   }
   else
   {

--
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