mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
restore: Simplify do_fork_with_pid() #2
Move xfree() up Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
1314e0d2e8
commit
f7b1e3fc77
@@ -1351,12 +1351,12 @@ static int do_fork_with_pid(struct pstree_item *item, struct ns_id *pid_ns, stru
|
||||
if (hlp_pid->ns[i].virt < 0)
|
||||
hlp_pid->ns[i].virt = INIT_PID + 1;
|
||||
}
|
||||
if (set_next_pid(pid_ns->parent, hlp_pid) < 0) {
|
||||
ret = set_next_pid(pid_ns->parent, hlp_pid);
|
||||
xfree(hlp_pid);
|
||||
if (ret) {
|
||||
pr_err("Can't set next pid\n");
|
||||
xfree(hlp_pid);
|
||||
return -1;
|
||||
}
|
||||
xfree(hlp_pid);
|
||||
|
||||
if (ca->clone_flags & CLONE_FILES)
|
||||
close_pid_proc();
|
||||
|
Reference in New Issue
Block a user