conf: consistently check for error when calling virSysinfoFormat()

Every other caller of this function checks for an error return and
ends their formatting early if there is an error. This function
happily continues on its way.

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Laine Stump 2020-07-04 17:55:59 -04:00
parent d30cfe70ef
commit f0f7ad14e9

View File

@ -29581,8 +29581,10 @@ virDomainDefFormatInternalSetRootName(virDomainDefPtr def,
if (def->resource)
virDomainResourceDefFormat(buf, def->resource);
for (i = 0; i < def->nsysinfo; i++)
virSysinfoFormat(buf, def->sysinfo[i]);
for (i = 0; i < def->nsysinfo; i++) {
if (virSysinfoFormat(buf, def->sysinfo[i]) < 0)
goto error;
}
if (def->os.bootloader) {
virBufferEscapeString(buf, "<bootloader>%s</bootloader>\n",