Close the iterator when cgroup_new_cgroup fails.
Signed-off-by: Jan Safranek <[email protected]>
---
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 7359779..a24dae7 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);
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel