Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
b66a2110
I
iSulad
项目概览
openeuler
/
iSulad
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
iSulad
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b66a2110
编写于
5月 07, 2020
作者:
W
WangFengTu
提交者:
lifeng68
7月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix memory leak
Signed-off-by:
N
WangFengTu
<
wangfengtu@huawei.com
>
上级
e8159715
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
21 addition
and
4 deletion
+21
-4
src/image/oci/oci_common_operators.c
src/image/oci/oci_common_operators.c
+3
-0
src/image/oci/registry/registry.c
src/image/oci/registry/registry.c
+12
-2
src/image/oci/registry/registry_apiv2.c
src/image/oci/registry/registry_apiv2.c
+3
-2
src/sha256/sha256.c
src/sha256/sha256.c
+3
-0
未找到文件。
src/image/oci/oci_common_operators.c
浏览文件 @
b66a2110
...
...
@@ -234,6 +234,9 @@ int oci_split_image_name(const char *image_name, char **host, char **name, char
}
}
free
(
tmp_image_name
);
tmp_image_name
=
NULL
;
return
0
;
}
...
...
src/image/oci/registry/registry.c
浏览文件 @
b66a2110
...
...
@@ -436,8 +436,12 @@ static int set_cached_info_to_desc(thread_fetch_info *infos, size_t infos_len, p
return
-
1
;
}
desc
->
layers
[
i
].
diff_id
=
util_strdup_s
(
cache
->
diffid
);
desc
->
layers
[
i
].
file
=
util_strdup_s
(
infos
[
i
].
file
);
if
(
desc
->
layers
[
i
].
diff_id
==
NULL
)
{
desc
->
layers
[
i
].
diff_id
=
util_strdup_s
(
cache
->
diffid
);
}
if
(
desc
->
layers
[
i
].
file
==
NULL
)
{
desc
->
layers
[
i
].
file
=
util_strdup_s
(
infos
[
i
].
file
);
}
}
}
...
...
@@ -1639,6 +1643,7 @@ out:
}
}
free_pull_desc
(
desc
);
desc
=
NULL
;
return
ret
;
}
...
...
@@ -1780,6 +1785,8 @@ void free_registry_pull_options(registry_pull_options *options)
free_registry_auth
(
&
options
->
auth
);
free
(
options
->
image_name
);
options
->
image_name
=
NULL
;
free
(
options
->
dest_image_name
);
options
->
dest_image_name
=
NULL
;
free
(
options
);
return
;
}
...
...
@@ -1908,5 +1915,8 @@ void free_pull_desc(pull_descriptor *desc)
free
(
desc
->
layers
);
desc
->
layers
=
NULL
;
desc
->
layers_len
=
0
;
free
(
desc
);
return
;
}
src/image/oci/registry/registry_apiv2.c
浏览文件 @
b66a2110
...
...
@@ -117,7 +117,8 @@ static int parse_challenges(pull_descriptor *desc, char *schema, char *params)
// schema == NULL means this challenge have not be used.
if
(
desc
->
challenges
[
i
].
schema
==
NULL
)
{
desc
->
challenges
[
i
]
=
c
;
return
0
;
ret
=
0
;
goto
out
;
}
}
...
...
@@ -133,7 +134,7 @@ out:
util_free_array
(
kv
);
kv
=
NULL
;
return
-
1
;
return
ret
;
}
static
int
parse_auth
(
pull_descriptor
*
desc
,
char
*
auth
)
...
...
src/sha256/sha256.c
浏览文件 @
b66a2110
...
...
@@ -368,6 +368,9 @@ out:
fclose
((
FILE
*
)
stream
);
}
free
(
buffer
);
buffer
=
NULL
;
if
(
ret
==
0
)
{
return
util_strdup_s
(
output_buffer
);
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录