27 lines
1.1 KiB
Diff
27 lines
1.1 KiB
Diff
From 3f949cbfe601de10d813fd08a5ca58cdc5a7258e Mon Sep 17 00:00:00 2001
|
|
From: xuxuepeng <xuxuepeng1@huawei.com>
|
|
Date: Tue, 29 Aug 2023 19:21:27 +0800
|
|
Subject: [PATCH] Use reference in loop in listpodsandbox
|
|
|
|
Signed-off-by: xuxuepeng <xuxuepeng1@huawei.com>
|
|
---
|
|
src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc b/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc
|
|
index 33b700f3..687f4e6d 100644
|
|
--- a/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc
|
|
+++ b/src/daemon/entry/cri/v1/v1_cri_pod_sandbox_manager_service.cc
|
|
@@ -739,7 +739,7 @@ void PodSandboxManagerService::ListPodSandbox(const runtime::v1::PodSandboxFilte
|
|
|
|
sandbox::SandboxManager::GetInstance()->ListAllSandboxes(filter, sandboxes);
|
|
|
|
- for (const auto sandbox : sandboxes) {
|
|
+ for (const auto &sandbox : sandboxes) {
|
|
std::unique_ptr<runtime::v1::PodSandbox> pod(new runtime::v1::PodSandbox);
|
|
|
|
pod->set_id(sandbox->GetId());
|
|
--
|
|
2.40.1
|
|
|