tests/qtests: clean-up and fix leak in generic_fuzz
commit3176990fb0307233ae5619e36b2c63241134e326
authorAlex Bennée <alex.bennee@linaro.org>
Fri, 30 Jun 2023 18:03:53 +0000 (30 19:03 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 3 Jul 2023 11:51:26 +0000 (3 12:51 +0100)
tree0c2bc4d695fde058699af61338ea8683ec302212
parent9ea2e69fb2df969332badd403f35b0e355f8a741
tests/qtests: clean-up and fix leak in generic_fuzz

An update to the clang tooling detects more issues with the code
including a memory leak from the g_string_new() allocation. Clean up
the code to avoid the allocation and use ARRAY_SIZE while we are at
it.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-9-alex.bennee@linaro.org>
tests/qtest/fuzz/generic_fuzz.c