From b5d3d1ef7010ce438582140fcf4ca7bee03ca7cd Mon Sep 17 00:00:00 2001 From: Ivana Hutarova Varekova Date: Tue, 7 Sep 2010 23:36:54 +0530 Subject: [PATCH] Add missing test to cgroup_read_stats_end This patch adds the missing test to cgroup_read_stats_end Sorry for the misstake. Fixed the test - it should return the error Signed-off-by: Ivana Hutarova Varekova Signed-off-by: Balbir Singh --- src/api.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/api.c b/src/api.c index 935fad94..b9a906f1 100644 --- a/src/api.c +++ b/src/api.c @@ -2841,6 +2841,9 @@ int cgroup_read_stats_end(void **handle) return ECGINVAL; fp = (FILE *)*handle; + if (fp == NULL) + return ECGINVAL; + fclose(fp); return 0; } -- 2.47.2