Commit 90b83a79 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

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: 's avatarPauli Nieminen <ext-pauli.nieminen@nokia.com> Reviewed-by: 's avatarPeter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent f23189e7
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment