提交 c9a8e594 编写于 作者: J John Ferlan

xen: Resolve Coverity FORWARD_NULL

Coverity found that xenXMConfigCacheAddFile has an error path in which
no error message and a -1 was not returned which could have resulted in
a NULL dereference in a VIR_DEBUG statement and of course an erroneous
0 value returned!
上级 75dfbb85
......@@ -279,6 +279,9 @@ xenXMConfigCacheAddFile(virConnectPtr conn, const char *filename)
virDomainDefFree(entry->def);
VIR_FREE(entry->filename);
VIR_FREE(entry);
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("xenXMConfigCacheRefresh: virHashAddEntry name"));
return -1;
}
}
VIR_DEBUG("Added config %s %s", entry->def->name, filename);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册