aboutsummaryrefslogtreecommitdiff
path: root/tests/test-string-input-visitor.c
diff options
context:
space:
mode:
authorHu Tao <hutao@cn.fujitsu.com>2014-06-10 19:15:26 +0800
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 18:44:21 +0300
commitcac124d17c5c3c75c588e12a8d7b44c9b057cb9a (patch)
tree548d8b9182a5850cae505dbd5824aeced794d103 /tests/test-string-input-visitor.c
parenteb1539b2343f2040decab39ccb9dc50dda75001c (diff)
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>
Diffstat (limited to 'tests/test-string-input-visitor.c')
-rw-r--r--tests/test-string-input-visitor.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index 877e737714..01a78f04ab 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -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);