From 5da69b97ff3ceab0d1bdc523a9cb7058fb4b9487 Mon Sep 17 00:00:00 2001 From: zhongtao Date: Tue, 12 Mar 2024 11:15:26 +0800 Subject: [PATCH 204/204] bugfix for wrong goto branch Signed-off-by: zhongtao --- src/utils/tar/isulad_tar.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/tar/isulad_tar.c b/src/utils/tar/isulad_tar.c index 073d1861..059bebc6 100644 --- a/src/utils/tar/isulad_tar.c +++ b/src/utils/tar/isulad_tar.c @@ -413,7 +413,7 @@ int archive_copy_to(const struct io_read_wrapper *content, const struct archive_ if (realpath(dstdir, cleanpath) == NULL) { ERROR("Failed to get real path for %s", dstdir); - return -1; + goto cleanup; } ret = archive_chroot_untar_stream(content, cleanpath, ".", src_base, dst_base, root_dir, err); @@ -447,7 +447,7 @@ static int tar_resource_rebase(const char *path, const char *rebase, const char if (realpath(srcdir, cleanpath) == NULL) { ERROR("Failed to get real path for %s", srcdir); - return -1; + goto cleanup; } DEBUG("chroot tar stream srcdir(%s) srcbase(%s) rebase(%s)", srcdir, srcbase, rebase); -- 2.25.1