As pointed out by Steve Grubb at http://article.gmane.org/gmane.comp.lib.libcg.devel/2485 we leak entry in cgroup_walk_tree_begin
When we fail fts_read, we need to ensure that entry is freed on return. Do so. Reported-by: Steve Grubb <[email protected]> Signed-off-by: Dhaval Giani <[email protected]> --- src/api.c | 1 + 1 file changed, 1 insertion(+) Index: libcg/src/api.c =================================================================== --- libcg.orig/src/api.c +++ libcg/src/api.c @@ -2831,6 +2831,7 @@ int cgroup_walk_tree_begin(const char *c ent = fts_read(entry->fts); if (!ent) { cgroup_dbg("fts_read failed\n"); + free(entry); return ECGINVAL; } if (!*base_level && depth) ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Libcg-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libcg-devel
