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 17:27:12 +0300 |
commit | 066dbbaafdef9777c9c7e08cf32ac127437b7bb0 (patch) | |
tree | d4ba79b569e774367f424cc70368b9e5a3f09bf5 | |
parent | aac8fb98fdd4f1100b6f48e7d35b765b99819cb9 (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; |