]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Don't corrupt pointer in qemuDomainSaveMemory()
authorPeter Krempa <pkrempa@redhat.com>
Tue, 6 Nov 2012 09:55:26 +0000 (10:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 6 Nov 2012 13:45:27 +0000 (14:45 +0100)
commitfb58f8e2a4c4ab619eab3860b263110a5bd9010f
tree8f8a678031af13a11c8198bec55c3eb442a92ac5
parent9c294e6f9a2ae23f4fbfc98d0dc2aec1ce9eba0b
qemu: Don't corrupt pointer in qemuDomainSaveMemory()

The code that was split out into the qemuDomainSaveMemory expands the
pointer containing the XML description of the domain that it gets from
higher layers. If the pointer changes the old one is invalid and the
upper layer function tries to free it causing an abort.

This patch changes the expansion of the original string to a new
allocation and copy of the contents.
src/qemu/qemu_driver.c