mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
conf: Allocate domain definition with the new helper
Use the virDomainDefNew() helper to allocate the definition instead of doing it via VIR_ALLOC.
This commit is contained in:
@@ -102,7 +102,7 @@ testReadNetworkConf(const void *data ATTRIBUTE_UNUSED)
|
||||
" </devices>\n"
|
||||
"</domain>\n";
|
||||
|
||||
if (VIR_ALLOC(def) < 0 ||
|
||||
if (!(def = virDomainDefNew()) ||
|
||||
VIR_STRDUP(def->os.type, "exe") < 0 ||
|
||||
VIR_STRDUP(def->os.init, "/sbin/init") < 0)
|
||||
goto cleanup;
|
||||
|
||||
Reference in New Issue
Block a user