]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Add free and copy function for qemuDomainJobInfo and use it
authorPeter Krempa <pkrempa@redhat.com>
Thu, 26 Mar 2020 16:55:00 +0000 (17:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 24 Apr 2020 06:56:57 +0000 (08:56 +0200)
commit72186f9c8c63983c55adb5194dda739ddc0f4043
treecb201e914b2dc7cfe39035d8649f97a4f95fbf28
parente77a0941419554f203febe43ba8cc1c5ac05753e
qemu: Add free and copy function for qemuDomainJobInfo and use it

In order to add a string to qemuDomainJobInfo we must ensure that it's
freed and copied properly. Add helpers to copy and free the structure
and adjust the code to use them properly for the new semantics.

Additionally also allocation is changed to g_new0 as it includes the
type and thus it's very easy to grep for all the allocations of a given
type.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
src/qemu/qemu_backup.c
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_migration.c
src/qemu/qemu_migration_cookie.c