summaryrefslogtreecommitdiffstats
path: root/src/config.c
diff options
context:
space:
mode:
authorKen'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp>2009-03-31 11:18:27 +0900
committerDhaval Giani <dhaval@linux.vnet.ibm.com>2009-03-31 11:33:10 +0530
commitdd1602c51180a63d2c75c049d7296c96cc1f51e9 (patch)
tree1d189813d12096145b0088a64384fd656b68cd1b /src/config.c
parent09f5406d4f4c48653d7b28fafd5dc776b0ba1284 (diff)
downloadlibcg-dd1602c51180a63d2c75c049d7296c96cc1f51e9.tar.gz
libcg-dd1602c51180a63d2c75c049d7296c96cc1f51e9.tar.xz
libcg-dd1602c51180a63d2c75c049d7296c96cc1f51e9.zip
Add fclose() calls for error handling
I reviewed the libcgroup code in the viewpoint of memory-leak and found some lacks of fclose(). This patch adds some fclose() calls for error handling. Signed-off-by: Ken'ichi Ohmichi <oomichi@mxs.nes.nec.co.jp> Signed-off-by: Dhaval Giani <dhaval@linux.vnet.ibm.com>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.c b/src/config.c
index b188985..a93fcce 100644
--- a/src/config.c
+++ b/src/config.c
@@ -469,6 +469,7 @@ int cgroup_config_load_config(const char *pathname)
if (yyparse() != 0) {
cgroup_dbg("Failed to parse file %s\n", pathname);
+ fclose(yyin);
return ECGROUPPARSEFAIL;
}