]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: fix use-after-free regression
authorEric Blake <eblake@redhat.com>
Thu, 5 Jan 2012 17:21:34 +0000 (10:21 -0700)
committerEric Blake <eblake@redhat.com>
Thu, 5 Jan 2012 17:21:34 +0000 (10:21 -0700)
commit820a2159e996fb6f72ce7a5f6af12f653deef127
tree918bb06d629f0598fba5ed4835f088de4292339e
parent302fe95ffa1bc5f1c61c0beb31a1adfbc38c668e
qemu: fix use-after-free regression

Commit baade4d fixed a memory leak on failure, but in the process,
introduced a use-after-free on success, which can be triggered with:

1. set bandwidth with --live
2. query bandwidth
3. set bandwidth with --live

* src/qemu/qemu_driver.c (qemuDomainSetInterfaceParameters): Don't
free newBandwidth on success.
Reported by Hu Tao.
src/qemu/qemu_driver.c