Ai
10 Star 5 Fork 49

src-openEuler/iSulad
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0100-bugfix-malloc-right-type-size.patch 1.65 KB
一键复制 编辑 原始数据 按行查看 历史
zhongtao 提交于 2024-06-11 19:55 +08:00 . code improve and bugfix
From 7bf26415fcba090e281324ba92f7d7e6487b94fc Mon Sep 17 00:00:00 2001
From: liuxu <liuxu156@huawei.com>
Date: Tue, 4 Jun 2024 16:30:19 +0800
Subject: [PATCH 100/108] bugfix:malloc right type size
Signed-off-by: liuxu <liuxu156@huawei.com>
---
src/client/connect/rest/rest_volumes_client.c | 2 +-
src/daemon/modules/service/service_network.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/client/connect/rest/rest_volumes_client.c b/src/client/connect/rest/rest_volumes_client.c
index 88254e6c..2327c28e 100644
--- a/src/client/connect/rest/rest_volumes_client.c
+++ b/src/client/connect/rest/rest_volumes_client.c
@@ -251,7 +251,7 @@ static int prune_request_to_rest(const struct isula_prune_volume_request *reques
parser_error err = NULL;
int ret = 0;
- nrequest = util_common_calloc_s(sizeof(volume_list_volume_request));
+ nrequest = util_common_calloc_s(sizeof(volume_prune_volume_request));
if (nrequest == NULL) {
ERROR("Out of memory");
return -1;
diff --git a/src/daemon/modules/service/service_network.c b/src/daemon/modules/service/service_network.c
index 6754cf1a..fe6dbf1d 100644
--- a/src/daemon/modules/service/service_network.c
+++ b/src/daemon/modules/service/service_network.c
@@ -74,7 +74,7 @@ static struct attach_net_conf_list *build_attach_networks(const defs_map_string_
return NULL;
}
- list = (struct attach_net_conf_list *)util_common_calloc_s(sizeof(struct attach_net_conf));
+ list = (struct attach_net_conf_list *)util_common_calloc_s(sizeof(struct attach_net_conf_list));
if (list == NULL) {
ERROR("Out of memory");
return NULL;
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/iSulad.git
git@gitee.com:src-openeuler/iSulad.git
src-openeuler
iSulad
iSulad
master

搜索帮助