diff options
-rw-r--r-- | xorg-server/xkb/ddxList.c | 7 | ||||
-rw-r--r-- | xorg-server/xkb/ddxLoad.c | 4 |
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 |