This patchset fixes various leaks that show up if you run migration-test under the clang leak-sanitizer. Since they're all test code problems, this is 9.2 material. The one leak that was really in the QEMU code I have sent a separate patch for: https://patchew.org/QEMU/20240820144429.320176-1-peter.mayd...@linaro.org/
You can repro these leaks by building a QEMU configured with '--cc=clang' '--cxx=clang++' '--enable-debug' '--target-list=x86_64-softmmu' '--enable-sanitizers' and then running the test like: (cd build/asan && \ ASAN_OPTIONS="fast_unwind_on_malloc=0" \ QTEST_QEMU_BINARY=./qemu-system-x86_64 ./tests/qtest/migration-test --tap -k ) thanks -- PMM Peter Maydell (9): tests/qtest/migration-test: Fix bootfile cleanup handling tests/qtest/migration-test: Don't leak resp in multifd_mapped_ram_fdset_end() tests/qtest/migration-test: Fix leaks in calc_dirtyrate_ready() tests/qtest/migration-helpers: Fix migrate_get_socket_address() leak tests/qtest/migration-test: Free QCRyptoTLSTestCertReq objects tests/unit/crypto-tls-x509-helpers: deinit privkey in test_tls_cleanup tests/qtest/migration-helpers: Don't dup argument to qdict_put_str() tests/qtest/migration-test: Don't strdup in get_dirty_rate() tests/qtest/migration-test: Don't leak QTestState in test_multifd_tcp_cancel() tests/unit/crypto-tls-x509-helpers.h | 6 +++++ tests/qtest/migration-helpers.c | 20 +++++++--------- tests/qtest/migration-test.c | 36 ++++++++++++++++++---------- tests/unit/crypto-tls-x509-helpers.c | 13 ++++++++-- 4 files changed, 50 insertions(+), 25 deletions(-) -- 2.34.1