aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/malloc-pc.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2019-04-22 11:58:00 +0200
committerPhilippe Mathieu-Daudé <philmd@redhat.com>2019-05-23 14:10:31 +0200
commit65461d124363d97b387337db9b970df60c31819d (patch)
tree58b032405c2a4941b375ac808a8ccd812bc607c2 /tests/libqos/malloc-pc.c
parent0729d833d6d6f9ec7a865b3f1c2bb727bb9e604b (diff)
tests/libqos: Add pc_fw_cfg_uninit() and use it
The pc_fw_cfg_init() function allocates an IO QFWCFG object. Add the pc_fw_cfg_uninit() function to deallocate it (and use it). Signed-off-by: Li Qiang <liq3ea@163.com> Tested-by: Thomas Huth <thuth@redhat.com> Message-Id: <20190424140643.62457-2-liq3ea@163.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> [PMD: Split patch, fill commit description, call uninit in malloc-pc.c] Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'tests/libqos/malloc-pc.c')
-rw-r--r--tests/libqos/malloc-pc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libqos/malloc-pc.c b/tests/libqos/malloc-pc.c
index 949a99361d..6f92ce4135 100644
--- a/tests/libqos/malloc-pc.c
+++ b/tests/libqos/malloc-pc.c
@@ -29,5 +29,5 @@ void pc_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags)
alloc_init(s, flags, 1 << 20, MIN(ram_size, 0xE0000000), PAGE_SIZE);
/* clean-up */
- g_free(fw_cfg);
+ pc_fw_cfg_uninit(fw_cfg);
}