diff mbox series

test-vmstate: Fix memleaks in test_load_qlist

Message ID 20200215043109.13688-1-kuhn.chenqun@huawei.com (mailing list archive)
State New, archived
Headers show
Series test-vmstate: Fix memleaks in test_load_qlist | expand

Commit Message

Chen Qun Feb. 15, 2020, 4:31 a.m. UTC
From: Chen Qun <kuhn.chenqun@huawei.com>

We may forget to free fload. ASAN spotted it.

Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Chen Qun <kuhn.chenqun@huawei.com>
---
 tests/test-vmstate.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c
index cea363dd69..5b2743121b 100644
--- a/tests/test-vmstate.c
+++ b/tests/test-vmstate.c
@@ -1395,6 +1395,7 @@  static void test_load_qlist(void)
     compare_containers(orig_container, dest_container);
     free_container(orig_container);
     free_container(dest_container);
+    qemu_fclose(fload);
 }
 
 typedef struct TmpTestStruct {