aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-11-24 00:48:42 +0100
committerUlrich Sibiller <uli42@gmx.de>2018-01-07 01:27:07 +0100
commit0e2c4df8e504e18c4ee73cb91ffaefdf58baecec (patch)
tree5648af11f6e3550fc6dacfc35a97b80deacab9ce /nx-X11/programs/Xserver/hw/nxagent
parent3de6bc7490ff6907cd0203c6143a75588458dbb9 (diff)
downloadnx-libs-0e2c4df8e504e18c4ee73cb91ffaefdf58baecec.tar.gz
nx-libs-0e2c4df8e504e18c4ee73cb91ffaefdf58baecec.tar.bz2
nx-libs-0e2c4df8e504e18c4ee73cb91ffaefdf58baecec.zip
Keyboard.c: fix memory leak
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
index 8ae64ee00..e77e44465 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c
@@ -1904,10 +1904,12 @@ void nxagentKeycodeConversionSetup(void)
FILE *keyboard_file;
if (!keyboard_file_path)
{
- FatalError("nxagentKeycodeConversionSetup: malloc failed.");
+ free(sessionpath);
+ FatalError("malloc for keyboard file path failed.");
}
strcpy(keyboard_file_path, sessionpath);
strcat(keyboard_file_path, "/keyboard");
+ free(sessionpath);
if ((keyboard_file = fopen(keyboard_file_path, "w"))) {
if (drules)
fprintf(keyboard_file, "rules=\"%s\"\n", drules[0] == '\0' ? "," : drules);