summary refs log tree commit diff stats
path: root/tests/test-opts-visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-opts-visitor.c')
-rw-r--r--tests/test-opts-visitor.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/tests/test-opts-visitor.c b/tests/test-opts-visitor.c
index b7acf7d294..297a02d6a2 100644
--- a/tests/test-opts-visitor.c
+++ b/tests/test-opts-visitor.c
@@ -17,7 +17,6 @@
 #include "qemu/option.h"          /* qemu_opts_parse() */
 #include "qapi/opts-visitor.h"    /* opts_visitor_new() */
 #include "test-qapi-visit.h"      /* visit_type_UserDefOptions() */
-#include "qapi/dealloc-visitor.h" /* qapi_dealloc_visitor_new() */
 
 static QemuOptsList userdef_opts = {
     .name = "userdef",
@@ -55,14 +54,7 @@ setup_fixture(OptsVisitorFixture *f, gconstpointer test_data)
 static void
 teardown_fixture(OptsVisitorFixture *f, gconstpointer test_data)
 {
-    if (f->userdef != NULL) {
-        QapiDeallocVisitor *dv;
-
-        dv = qapi_dealloc_visitor_new();
-        visit_type_UserDefOptions(qapi_dealloc_get_visitor(dv), NULL,
-                                  &f->userdef, NULL);
-        qapi_dealloc_visitor_cleanup(dv);
-    }
+    qapi_free_UserDefOptions(f->userdef);
     error_free(f->err);
 }