aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-06-27 22:37:55 +0900
committerThomas Huth <thuth@redhat.com>2024-07-02 09:34:55 +0200
commit0d626d12eb3e550a1ac0dd2e505042ed1fb4d50b (patch)
tree05333bfc5b0b5df78e57554bb739e25900777d71 /tests/qtest
parentf48b7a4b69b55ed0c9e74013822ee3b16d8d7055 (diff)
downloadqemu-0d626d12eb3e550a1ac0dd2e505042ed1fb4d50b.zip
qemu-0d626d12eb3e550a1ac0dd2e505042ed1fb4d50b.tar.gz
qemu-0d626d12eb3e550a1ac0dd2e505042ed1fb4d50b.tar.bz2
tests/qtest: Free old machine variable name
This fixes LeakSanitizer warnings. Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20240627-san-v2-12-750bb0946dbd@daynix.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest')
-rw-r--r--tests/qtest/libqtest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c
index ca46b1f..1326e34 100644
--- a/tests/qtest/libqtest.c
+++ b/tests/qtest/libqtest.c
@@ -1514,6 +1514,7 @@ static struct MachInfo *qtest_get_machines(const char *var)
int idx;
if (g_strcmp0(qemu_var, var)) {
+ g_free(qemu_var);
qemu_var = g_strdup(var);
/* new qemu, clear the cache */