aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/xkb/ddxList.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/xkb/ddxList.c')
-rw-r--r--xorg-server/xkb/ddxList.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c
index e4e32075b..f23effa97 100644
--- a/xorg-server/xkb/ddxList.c
+++ b/xorg-server/xkb/ddxList.c
@@ -161,6 +161,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)
@@ -176,6 +177,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)
@@ -200,8 +202,7 @@ char tmpname[PATH_MAX];
}
if (!in)
{
- if (buf != NULL)
- free(buf);
+ free(buf);
#ifdef WIN32
unlink(tmpname);
#endif
@@ -269,8 +270,7 @@ char tmpname[PATH_MAX];
fclose(in);
unlink(tmpname);
#endif
- if (buf != NULL)
- free(buf);
+ free(buf);
return status;
}