aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2018-10-29 23:34:10 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-11-09 15:31:57 +0100
commit90b83a79e6aed4e54ac29d022adf16be6869f054 (patch)
tree851317f4bfe2e35274710aa96536a03834c1d4b3 /nx-X11/programs
parentf23189e7392254c9458bf76504920cb868360e40 (diff)
downloadnx-libs-90b83a79e6aed4e54ac29d022adf16be6869f054.tar.gz
nx-libs-90b83a79e6aed4e54ac29d022adf16be6869f054.tar.bz2
nx-libs-90b83a79e6aed4e54ac29d022adf16be6869f054.zip
xkb: Fix memory leak if opening file fails
Author: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Date: Thu Jul 22 11:33:33 2010 +0300 xkb: Fix memory leak if opening file fails If fopen fails pointer in buf would be overwriten with a new pointer. Signed-off-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/xkb/ddxList.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/xkb/ddxList.c b/nx-X11/programs/Xserver/xkb/ddxList.c
index e48e28da4..e751b6b24 100644
--- a/nx-X11/programs/Xserver/xkb/ddxList.c
+++ b/nx-X11/programs/Xserver/xkb/ddxList.c
@@ -167,6 +167,7 @@ char tmpname[PATH_MAX];
}
if (!in) {
haveDir= False;
+ free(buf);
buf = Xprintf(
"'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg,
XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long)
@@ -182,6 +183,7 @@ char tmpname[PATH_MAX];
}
if (!in) {
haveDir= False;
+ free(buf);
buf = Xprintf(
"xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg,
componentDirs[what],(long)