Commit 5a8e2f27 authored by Mikhail Gusarov's avatar Mikhail Gusarov

Do not jump through the hoops to deallocate xkbbasedirflag variable

Fixes gcc warning as well.
Signed-off-by: Mikhail Gusarov's avatarMikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp's avatarJamey Sharp <jamey@minilop.net>
Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
parent ff2b4cf8
......@@ -186,7 +186,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
const char *emptystring = "";
const char *xkbbasedirflag = emptystring;
char *xkbbasedirflag = NULL;
const char *xkbbindir = emptystring;
const char *xkbbindirsep = emptystring;
......@@ -230,13 +230,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
xkbbindir, xkbbindirsep,
( (xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
xkbbasedirflag, xkmfile,
xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
xkm_output_dir, keymap);
if (xkbbasedirflag != emptystring) {
free(xkbbasedirflag);
}
free(xkbbasedirflag);
#ifndef WIN32
out= Popen(buf,"w");
......
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