diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-03-29 17:17:40 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2011-04-04 15:47:58 +0300 |
commit | 45b6667b651a0a26b17f64c9e99d70784045e4bf (patch) | |
tree | 3d3fceb954e380cbf2267cc76b6edc676ac2e309 | |
parent | 0b288c8738a97cf6aa3f36aa5c05e7ac2a5cbca8 (diff) |
xkb: fix fd leak in XkbDDXListComponent
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Nicolas Peninguy <nico@lostgeeks.org>
-rw-r--r-- | xkb/ddxList.c | 4 |
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; |