Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
iSulad
提交
32c7d43c
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,发现更多精彩内容 >>
提交
32c7d43c
编写于
7月 07, 2020
作者:
Z
Zhangxiaoyu
提交者:
lifeng68
7月 25, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix memory leak
Signed-off-by:
N
Zhangxiaoyu
<
zhangxiaoyu58@huawei.com
>
上级
d280970e
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
59 addition
and
15 deletion
+59
-15
CI/make-and-install.sh
CI/make-and-install.sh
+3
-3
src/cmd/isula/information/ps.c
src/cmd/isula/information/ps.c
+2
-2
src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/driver_devmapper.c
...rage/layer_store/graphdriver/devmapper/driver_devmapper.c
+1
-1
src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/driver_devmapper.h
...rage/layer_store/graphdriver/devmapper/driver_devmapper.h
+1
-1
src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
...odules/image/oci/storage/layer_store/graphdriver/driver.c
+17
-2
src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.h
...odules/image/oci/storage/layer_store/graphdriver/driver.h
+1
-1
src/daemon/modules/image/oci/storage/layer_store/graphdriver/overlay2/driver_overlay2.c
...torage/layer_store/graphdriver/overlay2/driver_overlay2.c
+29
-3
src/daemon/modules/image/oci/storage/layer_store/graphdriver/overlay2/driver_overlay2.h
...torage/layer_store/graphdriver/overlay2/driver_overlay2.h
+1
-1
src/daemon/modules/image/oci/storage/layer_store/graphdriver/quota/project_quota.c
...oci/storage/layer_store/graphdriver/quota/project_quota.c
+1
-1
src/daemon/modules/image/oci/storage/layer_store/graphdriver/quota/project_quota.h
...oci/storage/layer_store/graphdriver/quota/project_quota.h
+2
-0
src/utils/cutils/utils_fs.c
src/utils/cutils/utils_fs.c
+1
-0
未找到文件。
CI/make-and-install.sh
浏览文件 @
32c7d43c
...
...
@@ -69,12 +69,13 @@ source $basepath/install_depends.sh
echo_success
"===================RUN DT-LLT TESTCASES START========================="
cd
$ISULAD_COPY_PATH
sed
-i
's/fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO/fd == 0 || fd == 1 || fd == 2 || fd >= 1000/g'
./src/utils/cutils/utils.c
rm
-rf
build
mkdir
build
&&
cd
build
if
[[
"x
${
GCOV
}
"
==
"xON"
]]
;
then
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-DENABLE_COVERAGE
=
ON
-DENABLE_UT
=
ON ..
make
-j
$(
nproc
)
ctest
# && ctest -T memcheck
ctest
-T
memcheck
--output-on-failure
if
[[
$?
-ne
0
]]
;
then
exit
1
fi
...
...
@@ -84,7 +85,7 @@ if [[ "x${GCOV}" == "xON" ]]; then
else
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-DENABLE_UT
=
ON ..
make
-j
$(
nproc
)
ctest
ctest
-D
ExperimentalCoverage
if
[[
$?
-ne
0
]]
;
then
exit
1
fi
...
...
@@ -92,7 +93,6 @@ fi
echo_success
"===================RUN DT-LLT TESTCASES END========================="
cd
$ISULAD_COPY_PATH
sed
-i
's/fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO/fd == 0 || fd == 1 || fd == 2 || fd >= 1000/g'
./src/utils/cutils/utils.c
# build rest version
cd
$ISULAD_COPY_PATH
...
...
src/cmd/isula/information/ps.c
浏览文件 @
32c7d43c
...
...
@@ -65,8 +65,8 @@ struct lengths {
};
const
char
*
const
g_containerstatusstr
[]
=
{
"unknown"
,
"inited"
,
"starting"
,
"running"
,
"exited"
,
"paused"
,
"restarting"
};
"exited"
,
"paused"
,
"restarting"
};
struct
filter_field
{
char
*
name
;
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/driver_devmapper.c
浏览文件 @
32c7d43c
...
...
@@ -528,7 +528,7 @@ out:
return
ret
;
}
int
devmapper_clean_up
(
const
struct
graphdriver
*
driver
)
int
devmapper_clean_up
(
struct
graphdriver
*
driver
)
{
if
(
driver
==
NULL
)
{
ERROR
(
"Invalid input param to cleanup devicemapper"
);
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/devmapper/driver_devmapper.h
浏览文件 @
32c7d43c
...
...
@@ -66,7 +66,7 @@ int devmapper_get_layer_metadata(const char *id, const struct graphdriver *drive
int
devmapper_get_driver_status
(
const
struct
graphdriver
*
driver
,
struct
graphdriver_status
*
status
);
int
devmapper_clean_up
(
const
struct
graphdriver
*
driver
);
int
devmapper_clean_up
(
struct
graphdriver
*
driver
);
int
devmapper_repair_lowers
(
const
char
*
id
,
const
char
*
parent
,
const
struct
graphdriver
*
driver
);
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.c
浏览文件 @
32c7d43c
...
...
@@ -368,12 +368,27 @@ void free_graphdriver_mount_opts(struct driver_mount_opts *opts)
int
graphdriver_cleanup
(
void
)
{
int
ret
=
0
;
if
(
g_graphdriver
==
NULL
)
{
ERROR
(
"Driver not inited yet"
);
return
-
1
;
ret
=
-
1
;
goto
out
;
}
if
(
g_graphdriver
->
ops
->
clean_up
(
g_graphdriver
)
!=
0
)
{
ret
=
-
1
;
goto
out
;
}
return
g_graphdriver
->
ops
->
clean_up
(
g_graphdriver
);
free
((
char
*
)
g_graphdriver
->
home
);
g_graphdriver
->
home
=
NULL
;
free
(
g_graphdriver
->
backing_fs
);
g_graphdriver
->
backing_fs
=
NULL
;
g_graphdriver
=
NULL
;
out:
return
ret
;
}
int
graphdriver_try_repair_lowers
(
const
char
*
id
,
const
char
*
parent
)
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/driver.h
浏览文件 @
32c7d43c
...
...
@@ -74,7 +74,7 @@ struct graphdriver_ops {
int
(
*
get_driver_status
)(
const
struct
graphdriver
*
driver
,
struct
graphdriver_status
*
status
);
int
(
*
clean_up
)(
const
struct
graphdriver
*
driver
);
int
(
*
clean_up
)(
struct
graphdriver
*
driver
);
int
(
*
try_repair_lowers
)(
const
char
*
id
,
const
char
*
parent
,
const
struct
graphdriver
*
driver
);
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/overlay2/driver_overlay2.c
浏览文件 @
32c7d43c
...
...
@@ -1775,12 +1775,38 @@ out:
return
ret
;
}
int
overlay2_clean_up
(
const
struct
graphdriver
*
driver
)
static
void
free_overlay_options
(
struct
overlay_options
*
opts
)
{
if
(
opts
==
NULL
)
{
return
;
}
free
((
char
*
)
opts
->
mount_options
);
opts
->
mount_options
=
NULL
;
free
(
opts
);
}
int
overlay2_clean_up
(
struct
graphdriver
*
driver
)
{
int
ret
=
0
;
if
(
driver
==
NULL
)
{
return
-
1
;
ret
=
-
1
;
goto
out
;
}
if
(
umount
(
driver
->
home
)
!=
0
)
{
ret
=
-
1
;
goto
out
;
}
return
umount
(
driver
->
home
);
free_pquota_control
(
driver
->
quota_ctrl
);
driver
->
quota_ctrl
=
NULL
;
free_overlay_options
(
driver
->
overlay_opts
);
driver
->
overlay_opts
=
NULL
;
out:
return
ret
;
}
static
int
check_lower_valid
(
const
char
*
driver_home
,
const
char
*
lower
)
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/overlay2/driver_overlay2.h
浏览文件 @
32c7d43c
...
...
@@ -59,7 +59,7 @@ int overlay2_get_layer_metadata(const char *id, const struct graphdriver *driver
int
overlay2_get_driver_status
(
const
struct
graphdriver
*
driver
,
struct
graphdriver_status
*
status
);
int
overlay2_clean_up
(
const
struct
graphdriver
*
driver
);
int
overlay2_clean_up
(
struct
graphdriver
*
driver
);
void
free_driver_create_opts
(
struct
driver_create_opts
*
opts
);
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/quota/project_quota.c
浏览文件 @
32c7d43c
...
...
@@ -308,7 +308,7 @@ static void get_next_project_id(const char *dirpath, struct pquota_control *ctrl
return
;
}
static
void
free_pquota_control
(
struct
pquota_control
*
ctrl
)
void
free_pquota_control
(
struct
pquota_control
*
ctrl
)
{
if
(
ctrl
==
NULL
)
{
return
;
...
...
src/daemon/modules/image/oci/storage/layer_store/graphdriver/quota/project_quota.h
浏览文件 @
32c7d43c
...
...
@@ -97,6 +97,8 @@ struct pquota_control {
struct
pquota_control
*
project_quota_control_init
(
const
char
*
home_dir
,
const
char
*
fs
);
void
free_pquota_control
(
struct
pquota_control
*
ctrl
);
#ifdef __cplusplus
}
#endif
...
...
src/utils/cutils/utils_fs.c
浏览文件 @
32c7d43c
...
...
@@ -536,6 +536,7 @@ static int util_mount_from_handler(const char *src, const char *dst, const char
goto
out
;
}
out:
free
(
mntdata
);
return
ret
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录