With a client name, the QMP command is specified to return a list of
one element.  This isn't locally obvious in the code.  Make it so.

Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
 net/net.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/net.c b/net/net.c
index e3ef1e4..3175809 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1064,6 +1064,10 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, 
const char *name,
                        " rx-filter querying", name);
             break;
         }
+
+        if (has_name) {
+            break;
+        }
     }
 
     if (filter_list == NULL && !error_is_set(errp) && has_name) {
-- 
1.8.1.4


Reply via email to