Skip to content

Commit

Permalink
seize: do not overwrite exit code from failpath
Browse files Browse the repository at this point in the history
Signed-off-by: Liu Hua <weldonliu@tencent.com>
  • Loading branch information
Liu Hua authored and avagin committed Sep 14, 2022
1 parent 6128eb6 commit 58257cb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions criu/seize.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit 58257cb

Please sign in to comment.