aboutsummaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/net.c b/net/net.c
index 75bb1770f9..d25f80232a 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1024,8 +1024,7 @@ int net_client_init(QemuOpts *opts, int is_netdev, Error **errp)
void *object = NULL;
Error *err = NULL;
int ret = -1;
- OptsVisitor *ov = opts_visitor_new(opts);
- Visitor *v = opts_get_visitor(ov);
+ Visitor *v = opts_visitor_new(opts);
{
/* Parse convenience option format ip6-net=fec0::0[/64] */
@@ -1075,7 +1074,7 @@ int net_client_init(QemuOpts *opts, int is_netdev, Error **errp)
}
error_propagate(errp, err);
- opts_visitor_cleanup(ov);
+ visit_free(v);
return ret;
}