aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/net.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/net.c b/net/net.c
index c1cd9c75f6..2afac24b79 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1227,6 +1227,7 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
if (nc->info->type != NET_CLIENT_DRIVER_NIC) {
if (has_name) {
error_setg(errp, "net client(%s) isn't a NIC", name);
+ assert(!filter_list);
return NULL;
}
continue;
@@ -1252,6 +1253,7 @@ RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
} else if (has_name) {
error_setg(errp, "net client(%s) doesn't support"
" rx-filter querying", name);
+ assert(!filter_list);
return NULL;
}