]> xenbits.xensource.com Git - libvirt.git/commit
phyp: Remove stack allocating a 4kb volume key and fix related memory leaks
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sat, 9 Apr 2011 09:59:07 +0000 (11:59 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Thu, 14 Apr 2011 10:54:36 +0000 (12:54 +0200)
commit444fd07a0a828de27bd69b9864699f675edafddd
tree0759e3a2ec13fa067181b4840524746f513f0015
parent4bfab4a0d33396bbb8d9546557e8c66a4896fdcb
phyp: Remove stack allocating a 4kb volume key and fix related memory leaks

Don't pre-allocate 4kb per key, make phypVolumeGetKey allocate the memory.

Make phypBuildVolume return the volume key instead of using pre-allocated
memory to store it.

Also fix a memory leak in phypVolumeLookupByName when phypVolumeGetKey
fails. Fix another memory leak in phypVolumeLookupByPath in the success
path. Fix phypVolumeGetXMLDesc leaking voldef.key.
src/phyp/phyp_driver.c
src/phyp/phyp_driver.h