From baa25031fcf68443bc1262bebec69a54fed38d88 Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Mon, 25 Nov 2024 15:18:13 +0800
Subject: [PATCH 155/156] sandbox:fix unused variables

Signed-off-by: liuxu <liuxu156@huawei.com>
---
 .../sandboxer/controller/client/grpc_sandboxer_client.cc       | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/daemon/sandbox/sandboxer/controller/client/grpc_sandboxer_client.cc b/src/daemon/sandbox/sandboxer/controller/client/grpc_sandboxer_client.cc
index d7ff76d7..5b7f3c1c 100644
--- a/src/daemon/sandbox/sandboxer/controller/client/grpc_sandboxer_client.cc
+++ b/src/daemon/sandbox/sandboxer/controller/client/grpc_sandboxer_client.cc
@@ -92,7 +92,6 @@ auto SandboxerClient::InitCreateRequest(sandbox_create_request &request,
     (void)memcpy(request.options->value, encoded.c_str(), encoded.size());
     request.options->value_len = encoded.size();
     request.netns_path = util_strdup_s(params.netNSPath.c_str());
-    sandbox_mount **mounts = NULL;
     size_t mounts_len = params.mounts.size();
     if (mounts_len > 0) {
         request.rootfs = (sandbox_mount**)util_common_calloc_s(mounts_len * sizeof(sandbox_mount *));
@@ -112,7 +111,7 @@ auto SandboxerClient::InitCreateRequest(sandbox_create_request &request,
                     free(m);
                     return false;
                 }
-                mounts[request.rootfs_len++] = m;
+                request.rootfs[request.rootfs_len++] = m;
                 m = NULL;
             }
         }
-- 
2.34.1

