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:
Peter Krempa 2015-10-19 19:06:55 +02:00
parent e7aa45055c
commit 1c888bade5

View File

@ -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);