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 <sgrubb@redhat.com>
Signed-off-by: Dhaval Giani <dhaval.giani@gmail.com>
Acked-By: Jan Safranek <jsafrane@redhat.com>
ent = fts_read(entry->fts);
if (!ent) {
cgroup_dbg("fts_read failed\n");
+ free(entry);
return ECGINVAL;
}
if (!*base_level && depth)