]> git.ipfire.org Git - thirdparty/libvirt.git/commit
snapshot: fix double free of qemuImgBinary
authorGuannan Ren <gren@redhat.com>
Sun, 11 Sep 2011 05:43:35 +0000 (13:43 +0800)
committerEric Blake <eblake@redhat.com>
Tue, 13 Sep 2011 15:11:11 +0000 (09:11 -0600)
commit011eeb41307c10c7a2430df2aa751b58ad2da9ae
tree98d2da3d4d16381945e8dc4d4c3522848001855d
parent7f2498efe45505135ed75c6548c21a89674cb6ba
snapshot: fix double free of qemuImgBinary

Regression introduced in commit 3881a470, due to an improper rebase
of a cleanup written beforehand but only applied after a rebased of
a refactoring that created a new function in commit 25fb3ef.

Also avoids passing NULL to printf %s.

* src/qemu/qemu_driver.c: In qemuDomainSnapshotForEachQcow2()
it free up the memory of qemu_driver->qemuImgBinary in the
cleanup tag which leads to the garbage value of qemuImgBinary
in qemu_driver struct and libvirtd crash when running
"virsh snapshot-create" command a second time.

Signed-off-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_driver.c