mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
f48b7a4b69
commit
0d626d12eb
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue