The function may fail and report an error, in which case we
should not just continue as if nothing happened.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_domain.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 88d9499bd0..d2bca4dd06 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -3106,7 +3106,8 @@ qemuDomainObjPrivateXMLParse(xmlXPathContextPtr ctxt,
priv->chardevStdioLogd = virXPathBoolean("boolean(./chardevStdioLogd)",
ctxt) == 1;
- qemuDomainObjPrivateXMLParseAllowReboot(ctxt, &priv->allowReboot);
+ if (qemuDomainObjPrivateXMLParseAllowReboot(ctxt, &priv->allowReboot) < 0)
+ goto error;
qemuDomainObjPrivateXMLParsePR(ctxt, &priv->prDaemonRunning);
--
2.35.1