tests: fix memory leak in test of string input visitor
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
eb1539b234
commit
cac124d17c
@ -193,6 +193,7 @@ static void test_visitor_in_fuzz(TestInputVisitorData *data,
|
||||
|
||||
v = visitor_input_test_init(data, buf);
|
||||
visit_type_int(v, &ires, NULL, NULL);
|
||||
visitor_input_teardown(data, NULL);
|
||||
|
||||
v = visitor_input_test_init(data, buf);
|
||||
visit_type_bool(v, &bres, NULL, NULL);
|
||||
@ -200,11 +201,13 @@ static void test_visitor_in_fuzz(TestInputVisitorData *data,
|
||||
|
||||
v = visitor_input_test_init(data, buf);
|
||||
visit_type_number(v, &nres, NULL, NULL);
|
||||
visitor_input_teardown(data, NULL);
|
||||
|
||||
v = visitor_input_test_init(data, buf);
|
||||
sres = NULL;
|
||||
visit_type_str(v, &sres, NULL, NULL);
|
||||
g_free(sres);
|
||||
visitor_input_teardown(data, NULL);
|
||||
|
||||
v = visitor_input_test_init(data, buf);
|
||||
visit_type_EnumOne(v, &eres, NULL, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user