tests/9pfs: Fix leak of local_test_path
authorGreg Kurz <groug@kaod.org>
Tue, 1 Feb 2022 15:15:07 +0000 (16:15 +0100)
committerChristian Schoenebeck <qemu_oss@crudebyte.com>
Thu, 17 Feb 2022 15:57:58 +0000 (16:57 +0100)
commitba6112e40c03594cf4e3a7a6ebf52341153e7496
tree09dc94c4facbdef4e76a97d0a2875ef4ed9c9884
parent68c66a96c8393d482599bf56f1c13c7ae3e13ec1
tests/9pfs: Fix leak of local_test_path

local_test_path is allocated in virtio_9p_create_local_test_dir() to hold the path
of the temporary directory. It should be freed in virtio_9p_remove_local_test_dir()
when the temporary directory is removed. Clarify the lifecycle of local_test_path
while here.

Based-on: <f6602123c6f7d0d593466231b04fba087817abbd.1642879848.git.qemu_oss@crudebyte.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <20220201151508.190035-2-groug@kaod.org>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
tests/qtest/libqos/virtio-9p.c