aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-28 11:45:50 +0000
committermarha <marha@users.sourceforge.net>2009-09-28 11:45:50 +0000
commit3a532b45fd32105232275e407c434d15cebeda77 (patch)
treeb35ac8fdea50eee866d7db70763ac46a353bd8e0
parente34b0799856ac420d9401366514b2ed0ac20fa2b (diff)
downloadvcxsrv-3a532b45fd32105232275e407c434d15cebeda77.tar.gz
vcxsrv-3a532b45fd32105232275e407c434d15cebeda77.tar.bz2
vcxsrv-3a532b45fd32105232275e407c434d15cebeda77.zip
Make sure the temporary file gets deleted after keyboard compilation.
-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