Skip to content

Commit df04868

Browse files
authored
Merge pull request #1934 from eriksjolund/criu-error-release
criu: fix error release
2 parents ff35788 + 2690032 commit df04868

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/libcrun/criu.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,11 @@ libcrun_container_checkpoint_linux_criu (libcrun_container_status_t *status, lib
571571
return crun_make_error (err, 0, "--parent-path must be relative");
572572
int is_dir = crun_dir_p_at (image_fd, cr_options->parent_path, false, err);
573573
if (UNLIKELY (is_dir <= 0))
574-
return crun_make_error (err, is_dir < 0 ? errno : ENOTDIR, "invalid --parent-path");
575-
574+
{
575+
if (is_dir < 0)
576+
return crun_error_wrap (err, "invalid --parent-path");
577+
return crun_make_error (err, ENOTDIR, "invalid --parent-path");
578+
}
576579
ret = libcriu_wrapper->criu_set_parent_images (cr_options->parent_path);
577580
if (UNLIKELY (ret != 0))
578581
return crun_make_error (err, -ret, "error setting CRIU parent images path to `%s`", cr_options->parent_path);

0 commit comments

Comments
 (0)