libxl: xenParseXMOS: separate VIR_ALLOC call

To reduce churn in the following patches.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Ján Tomko 2020-10-06 16:45:20 +02:00
parent d0de0431ff
commit 7c93f8cb74

View File

@ -42,8 +42,10 @@ xenParseXMOS(virConfPtr conf, virDomainDefPtr def)
if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) {
g_autofree char *boot = NULL;
if (VIR_ALLOC(def->os.loader) < 0 ||
xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0)
if (VIR_ALLOC(def->os.loader) < 0)
return -1;
if (xenConfigCopyString(conf, "kernel", &def->os.loader->path) < 0)
return -1;
if (xenConfigGetString(conf, "boot", &boot, "c") < 0)