mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
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:
parent
d30cfe70ef
commit
f0f7ad14e9
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user