monitor: Fix failure path for "S" argument
authorBandan Das <bsd@redhat.com>
Wed, 3 Jun 2015 22:38:10 +0000 (18:38 -0400)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 22 Jun 2015 15:40:00 +0000 (17:40 +0200)
Since the "S" argument type is only used with the "?" flag,
the bug can't bite.

Signed-off-by: Bandan Das <bsd@redhat.com>
Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
monitor.c

index 4c7faf9716ff02a347872d0c63c24c4cbc276d9d..8b1dbf85c1b20b3f249cbdda98919cc1b4cd903a 100644 (file)
--- a/monitor.c
+++ b/monitor.c
@@ -4016,7 +4016,7 @@ static QDict *monitor_parse_arguments(Monitor *mon,
                 if (len <= 0) {
                     monitor_printf(mon, "%s: string expected\n",
                                    cmd->name);
-                    break;
+                    goto fail;
                 }
                 qdict_put(qdict, key, qstring_from_str(p));
                 p += len;