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

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@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

On Wed, Feb 04, 2015 at 10:33:29 +0800, Luyao Huang wrote:
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@redhat.com> --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+)
ACK. Pushed with fixed commit message. Peter

On 02/04/2015 03:29 PM, Peter Krempa wrote:
On Wed, Feb 04, 2015 at 10:33:29 +0800, Luyao Huang wrote:
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@redhat.com> --- src/conf/domain_conf.c | 1 + 1 file changed, 1 insertion(+) ACK. Pushed with fixed commit message.
Thanks a lot for review and message fixed. Also thanks for review another patch just like this :)
Peter
Luyao
participants (3)
-
lhuang
-
Luyao Huang
-
Peter Krempa