test-vmstate: Fix memleaks in test_load_qlist
commita6fbd637557a850fa22a5527c896d990c4b4d60f
authorChen Qun <kuhn.chenqun@huawei.com>
Thu, 20 Feb 2020 13:41:03 +0000 (20 21:41 +0800)
committerJuan Quintela <quintela@redhat.com>
Fri, 28 Feb 2020 08:25:49 +0000 (28 09:25 +0100)
tree48b63d8fc7c84b5bc3f5b91cbc1931defa8ff6a1
parent600fe89d6e627a18a01f4b7aef15d84efdb81548
test-vmstate: Fix memleaks in test_load_qlist

There is memleak in test_load_qlist().It's not a big deal,
but test-vmstate will fail if sanitizers is enabled.

In addition, "ret" is written twice with the same value
 in test_gtree_load_iommu().

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
tests/test-vmstate.c