summary refs log tree commit diff stats
path: root/tests/test-string-input-visitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-string-input-visitor.c')
-rw-r--r--tests/test-string-input-visitor.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index 81149084a2..f99824d240 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -92,19 +92,17 @@ static void test_visitor_in_intList(TestInputVisitorData *data,
     }
     g_assert(!tmp);
 
-    tmp = res;
-    while (tmp) {
-        res = res->next;
-        g_free(tmp);
-        tmp = res;
-    }
+    qapi_free_int16List(res);
 
     visitor_input_teardown(data, unused);
 
     v = visitor_input_test_init(data, "not an int list");
 
+    /* FIXME: res should be NULL on failure, regardless of starting value */
+    res = NULL;
     visit_type_int16List(v, NULL, &res, &err);
-    /* FIXME fix the visitor, then error_free_or_abort(&err) here */
+    error_free_or_abort(&err);
+    g_assert(!res);
 }
 
 static void test_visitor_in_bool(TestInputVisitorData *data,