qemu/tests
Alex Bennée 4025874199 plugins: fix memory leak while parsing options
It was hard to track down this leak as it was an internal allocation
by glib and the backtraces did not give much away. The autofree was
freeing the allocation with g_free() but not taking care of the
individual strings. They should have been freed with g_strfreev()
instead.

Searching the glib source code for the correct string free function
led to:

  G_DEFINE_AUTO_CLEANUP_FREE_FUNC(GStrv, g_strfreev, NULL)

and indeed if you read to the bottom of the documentation page you
will find:

  typedef gchar** GStrv;

  A typedef alias for gchar**. This is mostly useful when used together with g_auto().

So fix up all the g_autofree g_strsplit case that smugly thought they
had de-allocation covered.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-21-alex.bennee@linaro.org>
2023-07-03 12:51:58 +01:00
..
avocado tests/avocado: Make the test_arm_bpim2u_gmac test more reliable 2023-07-03 12:51:58 +01:00
bench migration/xbzrle: Use i386 host/cpuinfo.h 2023-05-23 16:51:18 -07:00
data tests/data/acpi: update after SMBIOS 2.0 change 2023-06-26 09:50:00 -04:00
decode decodetree: Add --output-null for meson testing 2023-05-31 19:56:42 -07:00
docker tests/docker: convert riscv64-cross to lcitool 2023-07-03 12:51:53 +01:00
fp tests: fp: remove unused submodules 2023-06-07 11:05:09 +02:00
guest-debug gdbstub: add test for untimely stop-reply packets 2023-05-18 12:40:52 -07:00
image-fuzzer
include
keys
lcitool tests/docker: convert riscv64-cross to lcitool 2023-07-03 12:51:53 +01:00
migration meson: Add static glib dependency for initrd-stress.img 2023-05-26 12:34:17 +02:00
multiboot
perf/block/qcow2
plugin plugins: fix memory leak while parsing options 2023-07-03 12:51:58 +01:00
qapi-schema qapi: Improve error message for description following section 2023-05-22 10:03:26 +02:00
qemu-iotests iotests: Test active commit with iothread and background I/O 2023-06-28 08:45:46 +02:00
qtest tests/qtests: clean-up and fix leak in generic_fuzz 2023-07-03 12:51:26 +01:00
rocker
tcg plugins: force slow path when plugins instrument memory ops 2023-07-03 12:51:58 +01:00
tsan
uefi-test-tools
unit test-block-iothread: Lock AioContext for blk_insert_bs() 2023-06-28 08:46:08 +02:00
vm tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
meson.build tests/decode: Convert tests to meson 2023-05-30 10:55:39 -07:00
requirements.txt tests: Use separate virtual environment for avocado 2023-06-06 16:29:53 +02:00
test-qht-par.c
vhost-user-bridge.c error handling: Use RETRY_ON_EINTR() macro where applicable 2023-01-09 13:50:47 +01:00