summaryrefslogtreecommitdiff
path: root/0011-Bugfix-in-config-and-executor.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-17 07:36:31 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-17 07:36:31 +0000
commit5de4bc645d087edfbc848d43ac0019a6535a3c73 (patch)
tree7354cf7f0504f1020c7c3165c77c21ef9257cbb4 /0011-Bugfix-in-config-and-executor.patch
parent4a79e40e226e2077b5e8cc274610e473b148f507 (diff)
automatic import of iSuladopeneuler20.03
Diffstat (limited to '0011-Bugfix-in-config-and-executor.patch')
-rw-r--r--0011-Bugfix-in-config-and-executor.patch52
1 files changed, 52 insertions, 0 deletions
diff --git a/0011-Bugfix-in-config-and-executor.patch b/0011-Bugfix-in-config-and-executor.patch
new file mode 100644
index 0000000..e038afd
--- /dev/null
+++ b/0011-Bugfix-in-config-and-executor.patch
@@ -0,0 +1,52 @@
+From 933eceb4545a28dba44c72f183dc7104d0fea714 Mon Sep 17 00:00:00 2001
+From: Xuepeng Xu <xuxuepeng1@huawei.com>
+Date: Wed, 15 Feb 2023 12:19:40 +0800
+Subject: [PATCH 11/53] Bugfix in config and executor
+
+Signed-off-by: Xuepeng Xu <xuxuepeng1@huawei.com>
+---
+ src/daemon/config/isulad_config.c | 2 +-
+ src/daemon/executor/container_cb/execution_create.c | 6 +++---
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/daemon/config/isulad_config.c b/src/daemon/config/isulad_config.c
+index 917e3eaa..38bf4bf9 100644
+--- a/src/daemon/config/isulad_config.c
++++ b/src/daemon/config/isulad_config.c
+@@ -314,7 +314,7 @@ char *conf_get_routine_rootdir(const char *runtime)
+ }
+
+ /* path = conf->rootpath + / + engines + / + runtime + /0 */
+- if (strlen(conf->json_confs->graph) > (SIZE_MAX - strlen(ENGINE_ROOTPATH_NAME)) - 3) {
++ if (strlen(conf->json_confs->graph) > (SIZE_MAX - strlen(ENGINE_ROOTPATH_NAME) - strlen(runtime)) - 3) {
+ ERROR("Graph path is too long");
+ goto out;
+ }
+diff --git a/src/daemon/executor/container_cb/execution_create.c b/src/daemon/executor/container_cb/execution_create.c
+index cc9ae716..4cc333fd 100644
+--- a/src/daemon/executor/container_cb/execution_create.c
++++ b/src/daemon/executor/container_cb/execution_create.c
+@@ -533,7 +533,7 @@ static char *try_generate_id()
+ int i = 0;
+ int max_time = 10;
+ char *id = NULL;
+- char *value = NULL;
++ container_t *value = NULL;
+
+ id = util_smart_calloc_s(sizeof(char), (CONTAINER_ID_MAX_LEN + 1));
+ if (id == NULL) {
+@@ -547,9 +547,9 @@ static char *try_generate_id()
+ goto err_out;
+ }
+
+- value = container_name_index_get(id);
++ value = containers_store_get(id);
+ if (value != NULL) {
+- free(value);
++ container_unref(value);
+ value = NULL;
+ continue;
+ } else {
+--
+2.25.1
+