diff --git a/criu/util.c b/criu/util.c index e4802d26d..0b4995e9d 100644 --- a/criu/util.c +++ b/criu/util.c @@ -563,6 +563,8 @@ int clone_service_fd(struct pstree_item *me) continue; pr_perror("Unable to clone %d->%d", old, new); } + if (ret >= 0 && !(rsti(me)->clone_flags & CLONE_FILES)) + close(old); } service_fd_id = id;