Message ID | 1529031683-27458-3-git-send-email-jasowang@redhat.com |
---|---|
State | New |
Headers | show |
Series | [PULL,1/4] tap: set vhostfd passed from qemu cli to non-blocking | expand |
diff --git a/net/net.c b/net/net.c index efb9eaf..2a31339 100644 --- a/net/net.c +++ b/net/net.c @@ -1093,7 +1093,9 @@ static int net_client_init(QemuOpts *opts, bool is_netdev, Error **errp) int ret = -1; Visitor *v = opts_visitor_new(opts); - if (is_netdev && is_help_option(qemu_opt_get(opts, "type"))) { + const char *type = qemu_opt_get(opts, "type"); + + if (is_netdev && type && is_help_option(type)) { show_netdevs(); exit(0); } else {