Close the iterator when cgroup_new_cgroup fails. Signed-off-by: Jan Safranek <jsafr...@redhat.com> ---
src/tools/cgsnapshot.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/tools/cgsnapshot.c b/src/tools/cgsnapshot.c index 4a6a8c8..a7119e7 100644 --- a/src/tools/cgsnapshot.c +++ b/src/tools/cgsnapshot.c @@ -486,7 +486,8 @@ static int display_controller_data( if (group == NULL) { printf("cannot create group '%s'\n", cgroup_name); - return -1; + ret = ECGFAIL; + goto err; } ret = cgroup_get_cgroup(group); ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-dev2dev _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel