summaryrefslogtreecommitdiff
path: root/xkb/ddxList.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkb/ddxList.c')
-rw-r--r--xkb/ddxList.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xkb/ddxList.c b/xkb/ddxList.c
index 9623cb6aa..3d301d88e 100644
--- a/xkb/ddxList.c
+++ b/xkb/ddxList.c
@@ -224,4 +224,6 @@ char tmpname[PATH_MAX];
buf = malloc(PATH_MAX * sizeof(char));
- if (!buf)
+ if (!buf) {
+ fclose(in);
return BadAlloc;
+ }
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {