qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 7/7] tests/qtest/libqtest.c: Check for g_setenv() failure


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 7/7] tests/qtest/libqtest.c: Check for g_setenv() failure
Date: Tue, 12 Mar 2024 21:20:47 +0100
User-agent: Mozilla Thunderbird

On 12/3/24 19:38, Peter Maydell wrote:
Coverity points out that g_setenv() can fail and we don't
check for this in qtest_inproc_init(). In practice this will
only fail if a memory allocation failed in setenv() or if
the caller passed an invalid architecture name (e.g. one
with an '=' in it), so rather than requiring the callsite
to check for failure, make g_setenv() failure fatal here,
similarly to what we did in commit aca68d95c515.

Resolves: Coverity CID 1497485
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
  tests/qtest/libqtest.c | 6 +++++-
  1 file changed, 5 insertions(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]