diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-05-06 19:58:19 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2021-05-14 12:37:00 +0200 |
commit | 2ed765fdeed88cb5434148f0d6ef27ece3dc063c (patch) | |
tree | a09f74d906bf24a5e6c8126b1189a9f4f994016f /job.c | |
parent | e0447a834d6170485ad925344223896d0d1d3810 (diff) |
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>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20210506185819.9010-1-peter.maydell@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'job.c')
0 files changed, 0 insertions, 0 deletions