From dcad670212cac36cca2c523420ab24e35f91ef87 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Thu, 29 Feb 2024 15:40:08 +0100 Subject: [PATCH] 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 Reviewed-by: Michal Privoznik --- src/qemu/qemu_firmware.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/qemu/qemu_firmware.c b/src/qemu/qemu_firmware.c index d39e61d071..3fd4f75778 100644 --- a/src/qemu/qemu_firmware.c +++ b/src/qemu/qemu_firmware.c @@ -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);