代码拉取完成,页面将自动刷新
From 2861c3105e1605c0a0b037558b0ccf54c9780678 Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Tue, 11 Feb 2025 11:08:31 +0800
Subject: [PATCH 191/198] bugfix:dereference null pointer
Signed-off-by: liuxu <liuxu156@huawei.com>
---
src/daemon/modules/container/container_gc/containers_gc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/daemon/modules/container/container_gc/containers_gc.c b/src/daemon/modules/container/container_gc/containers_gc.c
index 3f2473d5..5dd299dc 100644
--- a/src/daemon/modules/container/container_gc/containers_gc.c
+++ b/src/daemon/modules/container/container_gc/containers_gc.c
@@ -461,15 +461,16 @@ static void gc_container_process(struct linked_list *it)
unsigned long long start_time = 0;
char *runtime = NULL;
char *id = NULL;
- container_garbage_config_gc_containers_element *gc_cont = NULL;
+ container_garbage_config_gc_containers_element *gc_cont = (container_garbage_config_gc_containers_element *)it->elem;
rt_detect_process_params_t detect_params = {
.pid = gc_cont->pid,
.start_time = gc_cont->start_time,
};
- gc_cont = (container_garbage_config_gc_containers_element *)it->elem;
id = gc_cont->id;
runtime = gc_cont->runtime;
+ pid = gc_cont->pid;
+ start_time = gc_cont->start_time;
if (runtime_detect_process(id, runtime, &detect_params) < 0) {
ret = clean_container_resource(id, runtime, pid);
--
2.34.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。