diff mbox

[v5,4/4] monitor: Fix failure path for "S" argument

Message ID 1433371090-11781-5-git-send-email-bsd@redhat.com
State New
Headers show

Commit Message

Bandan Das June 3, 2015, 10:38 p.m. UTC
Since the "S" argument type is only used with the "?" flag,
the bug can't bite.

Signed-off-by: Bandan Das <bsd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 640c05c..5a18844 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4062,7 +4062,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;