提交 de3e38a6 编写于 作者: J Jim Meyering

esx_vi.c: do not call through NULL function pointer

* src/esx/esx_vi.c (esxVI_List_CastFromAnyType): For invalid
inputs, fail right away.  Do not "goto failure" where a NULL
input pointer would be dereferenced.
上级 fa479727
......@@ -935,7 +935,7 @@ esxVI_List_CastFromAnyType(virConnectPtr conn, esxVI_AnyType *anyType,
if (list == NULL || *list != NULL ||
castFromAnyTypeFunc == NULL || freeFunc == NULL) {
ESX_VI_ERROR(conn, VIR_ERR_INTERNAL_ERROR, "Invalid argument");
goto failure;
return -1;
}
if (anyType == NULL) {
......@@ -946,7 +946,7 @@ esxVI_List_CastFromAnyType(virConnectPtr conn, esxVI_AnyType *anyType,
ESX_VI_ERROR(conn, VIR_ERR_INTERNAL_ERROR,
"Expecting type to begin with 'ArrayOf' but found '%s'",
anyType->other);
goto failure;
return -1;
}
for (childNode = anyType->_node->xmlChildrenNode; childNode != NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册