diff options
author | Peter Maydell | 2021-05-06 20:58:19 +0200 |
---|---|---|
committer | Dr. David Alan Gilbert | 2021-05-13 19:21:14 +0200 |
commit | ff7b9b56cd7053eef0aaf40c32c2be475fd37df8 (patch) | |
tree | 9329ae38b040186f64f0874673d9659d1c756cc5 /tests/migration/guestperf/comparison.py | |
parent | tests/migration-test: Fix "true" vs true (diff) | |
download | qemu-ff7b9b56cd7053eef0aaf40c32c2be475fd37df8.tar.gz qemu-ff7b9b56cd7053eef0aaf40c32c2be475fd37df8.tar.xz qemu-ff7b9b56cd7053eef0aaf40c32c2be475fd37df8.zip |
tests/qtest/migration-test: Use g_autofree to avoid leaks on error paths
Coverity notices that several places in the migration-test code fail
to free memory in error-exit paths. This is pretty unimportant in
test case code, but we can avoid having to manually free the memory
entirely by using g_autofree.
The places where Coverity spotted a leak were relating to early exits
not freeing 'uri' in test_precopy_unix(), do_test_validate_uuid(),
migrate_postcopy_prepare() and test_migrate_auto_converge(). This
patch converts all the string-allocation in the test code to
g_autofree for consistency.
Fixes: Coverity CID 1432313, 1432315, 1432352, 1432364
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20210506185819.9010-1-peter.maydell@linaro.org>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tests/migration/guestperf/comparison.py')
0 files changed, 0 insertions, 0 deletions