From 165912f5f5a8346613f75ec16c4c5b2aeb7e81e7 Mon Sep 17 00:00:00 2001
From: "Neil.wrz" <wangrunze13@huawei.com>
Date: Sat, 27 May 2023 02:44:46 -0700
Subject: [PATCH 13/15] fix forget to set return value

Signed-off-by: Neil.wrz <wangrunze13@huawei.com>
---
 .../image/oci/storage/remote_layer_support/ro_symlink_maintain.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/daemon/modules/image/oci/storage/remote_layer_support/ro_symlink_maintain.c b/src/daemon/modules/image/oci/storage/remote_layer_support/ro_symlink_maintain.c
index 2bcc43e6..4d234aab 100644
--- a/src/daemon/modules/image/oci/storage/remote_layer_support/ro_symlink_maintain.c
+++ b/src/daemon/modules/image/oci/storage/remote_layer_support/ro_symlink_maintain.c
@@ -135,6 +135,7 @@ static int do_build_ro_dir(const char *home, const char *id)
 
     nret = asprintf(&ro_layer_dir, "%s/%s/%s", home, REMOTE_RO_LAYER_DIR, id);
     if (nret < 0 || nret > PATH_MAX) {
+        ret = -1;
         SYSERROR("Failed to create ro layer dir path");
         goto out;
     }
-- 
2.25.1

