]> xenbits.xensource.com Git - libvirt.git/commit
vbox: snapshot: Avoid memleaks in functions dealing with disk arrays
authorPeter Krempa <pkrempa@redhat.com>
Tue, 17 Jun 2014 09:09:29 +0000 (11:09 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 Jun 2014 11:28:44 +0000 (13:28 +0200)
commit28427e6b2a05bbce108cb03a46dd91755a7e4a83
tree44e2f9bc1cab6115d12b03373dc5fcf93feac12c
parentca9a94a0a92b1a2a3431bc7b78474ecf31437226
vbox: snapshot: Avoid memleaks in functions dealing with disk arrays

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