aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/xkb/ddxList.c7
-rw-r--r--xorg-server/xkb/ddxLoad.c4
2 files changed, 10 insertions, 1 deletions
diff --git a/xorg-server/xkb/ddxList.c b/xorg-server/xkb/ddxList.c
index 3ff3d81b4..47e83ad4b 100644
--- a/xorg-server/xkb/ddxList.c
+++ b/xorg-server/xkb/ddxList.c
@@ -214,7 +214,12 @@ char tmpname[PATH_MAX];
}
buf = xalloc(PATH_MAX * sizeof(char));
if (!buf)
- return BadAlloc;
+ {
+#ifdef WIN32
+ unlink(tmpname);
+#endif
+ return BadAlloc;
+ }
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags;
register unsigned int i;
diff --git a/xorg-server/xkb/ddxLoad.c b/xorg-server/xkb/ddxLoad.c
index 6954dd150..b098e01e5 100644
--- a/xorg-server/xkb/ddxLoad.c
+++ b/xorg-server/xkb/ddxLoad.c
@@ -269,6 +269,10 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
}
if (buf != NULL)
xfree (buf);
+#ifdef WIN32
+ /* remove the temporary file */
+ unlink(tmpname);
+#endif
return True;
}
else