[libvirt] [PATCH 01/34] hyperv: Allocate 'def' via virDomainDefNew
Peter Krempa
pkrempa at redhat.com
Fri Nov 20 15:21:51 UTC 2015
Use the helper that is necessary to fill out some values rather than
allocating it directly.
---
src/hyperv/hyperv_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 1958bbe..72261df 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -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);
--
2.6.2
More information about the libvir-list
mailing list