[CRIU] [PATCH] cgroup: call fin_cgroup() on error paths

Andrew Vagin avagin at openvz.org
Mon Aug 25 03:29:10 PDT 2014


fini_cgroup umounts a cgyard directory, which is mounted
in prepare_cgroup().

Reported-by: Mr Jenkins
Signed-off-by: Andrew Vagin <avagin at openvz.org>
---
 cr-restore.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cr-restore.c b/cr-restore.c
index 0349e3e..bb29ab5 100644
--- a/cr-restore.c
+++ b/cr-restore.c
@@ -1822,8 +1822,8 @@ int cr_restore_tasks(void)
 	if (prepare_cgroup_properties() < 0)
 		goto err;
 
-	fini_cgroup();
 err:
+	fini_cgroup();
 	cr_plugin_fini();
 	return ret;
 }
-- 
1.9.3



More information about the CRIU mailing list