From: Michal Privoznik Date: Mon, 31 Jan 2022 12:52:25 +0000 (+0100) Subject: test_driver: Don't leak @group_name X-Git-Tag: v8.1.0-rc1~224 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=726b9616b297c36af5f97bcb1ce2788f194a9fe1;p=thirdparty%2Flibvirt.git 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 Reviewed-by: Erik Skultety --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 1504334c30..9e1fc65972 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -4027,7 +4027,6 @@ testDomainSetBlockIoTune(virDomainPtr dom, #undef TEST_BLOCK_IOTUNE_MAX_CHECK virDomainDiskSetBlockIOTune(conf_disk, &info); - info.group_name = NULL; ret = 0; cleanup: