From: Ivana Hutarova Varekova Date: Thu, 16 Jun 2011 13:08:18 +0000 (+0200) Subject: api: cg_rd_ctrl_file does not free fd X-Git-Tag: v0.38~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6df6d8c63d4e29f9549d0460406cff44aa31b1b4;p=thirdparty%2Flibcgroup.git api: cg_rd_ctrl_file does not free fd cg_rd_ctrl_file does not free a fd in a special situation. This patch fixes it Signed-off-by: Ivana Hutarova Varekova Signed-off-by: Jan Safranek --- diff --git a/src/api.c b/src/api.c index 66cc2b3d..bc27e9bd 100644 --- a/src/api.c +++ b/src/api.c @@ -2083,6 +2083,7 @@ static int cg_rd_ctrl_file(const char *subsys, const char *cgroup, *value = calloc(CG_VALUE_MAX, 1); if (!*value) { + fclose(ctrl_file); last_errno = errno; return ECGOTHER; }