提交 fd91ac81 编写于 作者: A Andrea Bolognani

conf: Clean up virDomainHostdevDefNew()

Follow the same style as other similar functions.
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
上级 1d0c6f59
......@@ -2434,13 +2434,13 @@ void virDomainVideoDefFree(virDomainVideoDefPtr def)
virDomainHostdevDefPtr
virDomainHostdevDefNew(virDomainXMLOptionPtr xmlopt)
{
virDomainHostdevDefPtr def = NULL;
virDomainHostdevDefPtr def;
if (VIR_ALLOC(def) < 0 ||
VIR_ALLOC(def->info) < 0) {
VIR_FREE(def);
if (VIR_ALLOC(def) < 0)
return NULL;
}
if (VIR_ALLOC(def->info) < 0)
goto error;
if (xmlopt &&
xmlopt->privateData.hostdevNew &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册