mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
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: John Ferlan <jferlan@redhat.com> Reviewed-by: Laine Stump <laine@laine.org> Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
This commit is contained in:
parent
5f723b74ed
commit
d6d8d7bb9a
@ -11138,7 +11138,7 @@ virDomainNetDefParseXML(virDomainXMLOptionPtr xmlopt,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (VIR_ALLOC(def->data.vhostuser) < 0)
|
if (!(def->data.vhostuser = virDomainChrSourceDefNew(xmlopt)))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
def->data.vhostuser->type = VIR_DOMAIN_CHR_TYPE_UNIX;
|
def->data.vhostuser->type = VIR_DOMAIN_CHR_TYPE_UNIX;
|
||||||
|
Loading…
Reference in New Issue
Block a user