mirror of https://gitee.com/openkylin/libvirt.git
hyperv: Allocate 'def' via virDomainDefNew
Use the helper that is necessary to fill out some values rather than allocating it directly.
This commit is contained in:
parent
e7aa45055c
commit
1c888bade5
|
@ -774,7 +774,7 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
|
|||
|
||||
/* Flags checked by virDomainDefFormat */
|
||||
|
||||
if (VIR_ALLOC(def) < 0)
|
||||
if (!(def = virDomainDefNew()))
|
||||
goto cleanup;
|
||||
|
||||
virUUIDFormat(domain->uuid, uuid_string);
|
||||
|
|
Loading…
Reference in New Issue