diff options
author | Ulrich Sibiller <uli42@gmx.de> | 2019-06-20 18:52:31 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2019-06-22 11:30:47 +0200 |
commit | fd7e1f989b757667e7d7a3f0d08c9ee4b21a3a7c (patch) | |
tree | 6826dca9680d28666037cb751fb0249c038364a3 /nx-X11/programs/Xserver/hw | |
parent | 3c0469971a5092781783b6a5c86b668047e475be (diff) | |
download | nx-libs-fd7e1f989b757667e7d7a3f0d08c9ee4b21a3a7c.tar.gz nx-libs-fd7e1f989b757667e7d7a3f0d08c9ee4b21a3a7c.tar.bz2 nx-libs-fd7e1f989b757667e7d7a3f0d08c9ee4b21a3a7c.zip |
Keyboard.c: rearrange code to make cppcheck happy
Otherwise it will (falsely) report "Memory pointed to by 'sessionpath' is freed twice."
Diffstat (limited to 'nx-X11/programs/Xserver/hw')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |