summaryrefslogtreecommitdiff
path: root/xkb
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-04-04 11:57:39 -0700
committerKeith Packard <keithp@keithp.com>2011-04-04 11:57:39 -0700
commitc9d89cec1407550cb2568f4cef146c93607bbae6 (patch)
treef304c31842697512b659b0fa364f7582309d5210 /xkb
parenta52049de2f846fe984d4db5ac8d2c1826c7b2d0b (diff)
parentbc61787a20e7683cbc4dfa45fe855da98a8c0cd0 (diff)
Merge remote-tracking branch 'vignatti/for-keith'
Diffstat (limited to 'xkb')
-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
@@ -222,8 +222,10 @@ char tmpname[PATH_MAX];
list->nFound[what]= 0;
free(buf);
buf = malloc(PATH_MAX * sizeof(char));
- if (!buf)
+ if (!buf) {
+ fclose(in);
return BadAlloc;
+ }
while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) {
unsigned flags;
register unsigned int i;