]> xenbits.xensource.com Git - libvirt.git/commit
blockjob: fix memleak that prevented block pivot
authorEric Blake <eblake@redhat.com>
Fri, 21 Dec 2012 00:13:50 +0000 (17:13 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 21 Dec 2012 19:43:49 +0000 (12:43 -0700)
commit08230dbd7d5b254b9eea0f30d3e4dcec68526f54
treeacd3bcf23e6478c3e5d4851bdd9d6017db684f5b
parent4f5c564939c6b7257672c7de3e74741e12e9ec4a
blockjob: fix memleak that prevented block pivot

https://bugzilla.redhat.com/show_bug.cgi?id=888426

The code for doing a block-copy was supposed to track the destination
file in drive->mirror, but was set up to do all mallocs prior to
starting the copy so that OOM wouldn't leave things partially started.
However, the wrong variable was being written; later in the code we
silently did 'disk->mirror = mirror' which was still NULL, and thus
leaking memory and leaving libvirt to think that the mirror job was
never started, which prevented a pivot operation after a copy.
Problem introduced in commit 35c7701c6.

* src/qemu/qemu_driver.c (qemuDomainBlockCopy): Initialize correct
variable.
src/qemu/qemu_driver.c