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 */
|
/* Flags checked by virDomainDefFormat */
|
||||||
|
|
||||||
if (VIR_ALLOC(def) < 0)
|
if (!(def = virDomainDefNew()))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
virUUIDFormat(domain->uuid, uuid_string);
|
virUUIDFormat(domain->uuid, uuid_string);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user