[libvirt] [PATCH] qemu: Don't corrupt pointer in qemuDomainSaveMemory()

Eric Blake eblake at redhat.com
Tue Nov 6 13:21:16 UTC 2012

On 11/06/2012 03:07 AM, Peter Krempa wrote:
> 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
> alocation and copy of the contents.


> ---
>  src/qemu/qemu_driver.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)

ACK.  Good find, and hidden enough that I can see how I missed it in the
first review.

Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121106/4cf7a06f/attachment-0001.sig>

More information about the libvir-list mailing list