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

conf: Use virDomainChrSourceDefNew for vhostuser

Rather than using VIR_ALLOC, use the New API since we already
use the virDomainChrSourceDefFree function when done.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NLaine Stump <laine@laine.org>
Reviewed-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
上级 5f723b74
......@@ -11138,7 +11138,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
if (VIR_ALLOC(def->data.vhostuser) < 0)
if (!(def->data.vhostuser = virDomainChrSourceDefNew(xmlopt)))
goto error;
def->data.vhostuser->type = VIR_DOMAIN_CHR_TYPE_UNIX;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册