]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qtest/libqtest.c
libqtest: check for g_setenv() failure
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 20 Aug 2021 16:37:50 +0000 (17:37 +0100)
committerThomas Huth <thuth@redhat.com>
Mon, 6 Sep 2021 07:07:00 +0000 (09:07 +0200)
commitaca68d95c51513ace81394dc0974a67b99abb234
tree0becde520a157c555d85b110b6184c8687520c35
parent1ea47ede63330c44292424df70dfb0ee44d2110f
libqtest: check for g_setenv() failure

g_setenv() can fail; check for it when starting a QEMU process
when we set the QEMU_AUDIO_DRV environment variable.

Because this happens after fork() reporting an exact message
via printf() is a bad idea; just exit(1), as we already do
for the case of execlp() failure.

Fixes: Coverity CID 1460117
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210820163750.9106-1-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/qtest/libqtest.c