2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

seize: do not overwrite exit code from failpath

Signed-off-by: Liu Hua <weldonliu@tencent.com>
This commit is contained in:
Liu Hua
2022-09-14 15:42:07 +08:00
committed by Andrei Vagin
parent 16f1c147c8
commit debc9c16cc

View File

@@ -535,8 +535,10 @@ static int freeze_processes(void)
}
err:
if (exit_code == 0 || origin_freezer_state == THAWED)
exit_code = freezer_write_state(fd, THAWED);
if (exit_code == 0 || origin_freezer_state == THAWED) {
if (freezer_write_state(fd, THAWED))
exit_code = -1;
}
if (close(fd)) {
pr_perror("Unable to thaw tasks");