提交 9ba04dec 编写于 作者: J John Ferlan

domain_conf: Resolve Coverity REVERSE_INULL

In virDomainActualNetDefFormat() a call to virDomainNetGetActualType(def)
was made before a check for (!def) a few lines later. This triggered
Coverity to note the possible NULL deref.  Just moving the initialization
to after the !def checks resolves the issue
上级 bab35f74
......@@ -16211,11 +16211,13 @@ virDomainActualNetDefFormat(virBufferPtr buf,
virDomainNetDefPtr def,
unsigned int flags)
{
unsigned int type = virDomainNetGetActualType(def);
const char *typeStr = virDomainNetTypeToString(type);
unsigned int type;
const char *typeStr;
if (!def)
return 0;
type = virDomainNetGetActualType(def);
typeStr = virDomainNetTypeToString(type);
if (!typeStr) {
virReportError(VIR_ERR_INTERNAL_ERROR,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册