[libvirt] [PATCHv2 2/2] vbox: snapshot: Avoid memleaks in functions dealing with disk arrays

Pavel Hrdina phrdina at redhat.com
Tue Jun 17 14:33:33 UTC 2014


On 17.6.2014 13:32, Peter Krempa wrote:
> In virVBoxSnapshotConfRemoveFakeDisks and
> virVBoxSnapshotConfDiskIsInMediaRegistry the disk array constructed from
> all the disks would be leaked at the end of the function and on
> allocation errors. Also the temporary disk list would be leaked.
> 
> Add a cleanup section and free the memory properly.
> 
> Found by coverity.
> ---
>  src/vbox/vbox_snapshot_conf.c | 40 ++++++++++++++++++++++++++++++----------
>  1 file changed, 30 insertions(+), 10 deletions(-)
> 

ACK

Pavel




More information about the libvir-list mailing list