]> xenbits.xensource.com Git - libvirt.git/commit
virsh: free the caps list properly if one of them is invalid
authorJán Tomko <jtomko@redhat.com>
Tue, 27 Aug 2013 11:47:57 +0000 (13:47 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 28 Aug 2013 06:05:56 +0000 (08:05 +0200)
commit14d5328681448267dfc0812948fa2c6ec4dfa7d4
tree628c6a68758bc77ea9a9d9b590a91988e07bb7a3
parent785ff34bf884a721544ea531c000e8a140e485fa
virsh: free the caps list properly if one of them is invalid

VIR_FREE(caps) is not enough to free an array allocated
by vshStringToArray.

==17== 4 bytes in 1 blocks are definitely lost in loss record 4 of 728
==17==    by 0x4EFFC44: virStrdup (virstring.c:554)
==17==    by 0x128B10: _vshStrdup (virsh.c:125)
==17==    by 0x129164: vshStringToArray (virsh.c:218)
==17==    by 0x157BB3: cmdNodeListDevices (virsh-nodedev.c:409)

https://bugzilla.redhat.com/show_bug.cgi?id=1001536
tools/virsh-nodedev.c