From dd375cebc920377b40ea55718215ba36ef542a27 Mon Sep 17 00:00:00 2001 From: Tycho Andersen Date: Thu, 28 Aug 2014 02:57:00 +0400 Subject: [PATCH] restore: don't restore cg props if task restore fails Once the task restore has failed, we can just abort, no need to restore the cg props. Signed-off-by: Tycho Andersen Acked-by: Andrew Vagin Signed-off-by: Pavel Emelyanov --- cr-restore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cr-restore.c b/cr-restore.c index 7bb5cef22..cefa78e76 100644 --- a/cr-restore.c +++ b/cr-restore.c @@ -1821,11 +1821,11 @@ int cr_restore_tasks(void) if (criu_signals_setup() < 0) goto err; - ret = restore_root_task(root_item); - - if (prepare_cgroup_properties() < 0) + if (restore_root_task(root_item) < 0) goto err; + ret = prepare_cgroup_properties(); + err: fini_cgroup(); cr_plugin_fini();