提交 1e648e7b 编写于 作者: W wujing 提交者: lifeng68

fix the bug of program crash when image config_v2->config is empty

Signed-off-by: Nwujing <wujing50@huawei.com>
上级 93f87f47
......@@ -3086,7 +3086,8 @@ static int pack_health_check_from_image(const docker_image_config_v2 *config_v2,
size_t i;
defs_health_check *healthcheck = NULL;
if (config_v2->config->healthcheck == NULL || config_v2->config->healthcheck->test_len == 0) {
if (config_v2->config == NULL || config_v2->config->healthcheck == NULL ||
config_v2->config->healthcheck->test_len == 0) {
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册