test_driver: Don't leak @group_name

In testDomainSetBlockIoTune() the info.group_name is strdup()-ed
and just after the whole @info structure is passed to
virDomainDiskSetBlockIOTune() the @group_name member is set to
NULL. This creates a memleak, because
virDomainDiskSetBlockIOTune() creates its own copy of the string.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
Michal Privoznik 2022-01-31 13:52:25 +01:00
parent d955cbd3a1
commit 726b9616b2

View File

@ -4027,7 +4027,6 @@ testDomainSetBlockIoTune(virDomainPtr dom,
#undef TEST_BLOCK_IOTUNE_MAX_CHECK
virDomainDiskSetBlockIOTune(conf_disk, &info);
info.group_name = NULL;
ret = 0;
cleanup: