[libvirt] [PATCH] conf: fix forget goto error when report a unsupport error

Luyao Huang lhuang at redhat.com
Wed Feb 4 02:33:29 UTC 2015


https://bugzilla.redhat.com/show_bug.cgi?id=1188914

This will cause a issue that add a unsupport input device
to a hypervisor which unsupport it, also will cause a wrong
error message when the input device is not a mouse or keyboard.

Signed-off-by: Luyao Huang <lhuang at redhat.com>
---
 src/conf/domain_conf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 706e5d2..09b8e9b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -8968,6 +8968,7 @@ virDomainInputDefParseXML(const virDomainDef *dom,
                 virReportError(VIR_ERR_INTERNAL_ERROR,
                                _("unsupported input bus %s"),
                                bus);
+                goto error;
             }
             if (def->type != VIR_DOMAIN_INPUT_TYPE_MOUSE &&
                 def->type != VIR_DOMAIN_INPUT_TYPE_KBD) {
-- 
1.8.3.1




More information about the libvir-list mailing list