qemu: Add missing early returns

In a couple of cases, we were reporting an error without
actually terminating the parse process.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Andrea Bolognani 2024-02-29 15:40:08 +01:00
parent c472736062
commit dcad670212

View File

@ -439,6 +439,7 @@ qemuFirmwareMappingKernelParse(const char *path,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("missing 'filename' in '%1$s'"),
path);
return -1;
}
kernel->filename = g_strdup(filename);
@ -458,6 +459,7 @@ qemuFirmwareMappingMemoryParse(const char *path,
virReportError(VIR_ERR_INTERNAL_ERROR,
_("missing 'filename' in '%1$s'"),
path);
return -1;
}
memory->filename = g_strdup(filename);