Re: [PATCH 1/4] test_driver: Don't leak @group_name

2022-02-01 Thread Erik Skultety
On Mon, Jan 31, 2022 at 03:53:39PM +0100, Michal Privoznik wrote: > 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 >

[PATCH 1/4] test_driver: Don't leak @group_name

2022-01-31 Thread Michal Privoznik
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.