]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Add missing early returns
authorAndrea Bolognani <abologna@redhat.com>
Thu, 29 Feb 2024 14:40:08 +0000 (15:40 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 4 Mar 2024 13:36:26 +0000 (14:36 +0100)
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>
src/qemu/qemu_firmware.c

index d39e61d07112b0f455e620008c31f3c305ca520f..3fd4f75778c71620617cbcc0190117e3db79f374 100644 (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);