This second series of patches also modifies a few files in src/util
to use VIR_AUTOFREE and VIR_AUTOPTR for automatic freeing of memory
and get rid of some VIR_FREE macro invocations and *Free function
calls.
The argument type of virCgroupFree is changed from virCgroupPtr *
to virCgroupPtr.
Sukrit Bhatnagar (40):
util: cgroup: modify virCgroupFree to take virCgroupPtr
util: error: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: buffer: typedef and Free helper for struct _virBufferEscapePair
util: buffer: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: buffer: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: buffer: use VIR_AUTOPTR for aggregate types
util: hash: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: cgroup: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: cgroup: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: cgroup: use VIR_AUTOPTR for aggregate types
util: mdev: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: mdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: mdev: use VIR_AUTOPTR for aggregate types
util: firewall: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: firewall: use VIR_AUTOPTR for aggregate types
util: hook: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: hook: use VIR_AUTOPTR for aggregate types
util: pci: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: pci: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: pci: use VIR_AUTOPTR for aggregate types
util: netdevvlan: define cleanup function using
VIR_DEFINE_AUTOPTR_FUNC
util: usb: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: usb: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: usb: use VIR_AUTOPTR for aggregate types
util: scsi: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: scsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: scsi: use VIR_AUTOPTR for aggregate types
util: scsivhost: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
util: scsivhost: use VIR_AUTOPTR for aggregate types
util: hostdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: hostdev: use VIR_AUTOPTR for aggregate types
util: hostmem: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: iptables: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: iscsi: use VIR_AUTOPTR for aggregate types
util: kmod: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: kmod: use VIR_AUTOPTR for aggregate types
util: lease: use VIR_AUTOFREE instead of VIR_FREE for scalar types
util: lease: use VIR_AUTOPTR for aggregate types
src/libvirt-lxc.c | 4 +-
src/lxc/lxc_cgroup.c | 4 +-
src/lxc/lxc_container.c | 2 +-
src/lxc/lxc_controller.c | 2 +-
src/lxc/lxc_domain.c | 2 +-
src/lxc/lxc_process.c | 10 +-
src/qemu/qemu_cgroup.c | 16 +-
src/qemu/qemu_domain.c | 2 +-
src/qemu/qemu_driver.c | 34 ++-
src/qemu/qemu_process.c | 2 +-
src/util/virbuffer.c | 34 ++-
src/util/virbuffer.h | 9 +-
src/util/vircgroup.c | 718 +++++++++++++++++------------------------------
src/util/vircgroup.h | 11 +-
src/util/vircgrouppriv.h | 2 +-
src/util/virerror.c | 1 -
src/util/virerror.h | 3 +
src/util/virfirewall.c | 53 ++--
src/util/virfirewall.h | 3 +
src/util/virhash.c | 1 -
src/util/virhash.h | 4 +
src/util/virhook.c | 20 +-
src/util/virhostdev.c | 162 ++++-------
src/util/virhostmem.c | 57 ++--
src/util/viriptables.c | 52 ++--
src/util/viriscsi.c | 89 ++----
src/util/virkmod.c | 38 +--
src/util/virlease.c | 82 ++----
src/util/virmdev.c | 84 ++----
src/util/virmdev.h | 4 +
src/util/virnetdevvlan.c | 1 -
src/util/virnetdevvlan.h | 4 +
src/util/virpci.c | 323 +++++++--------------
src/util/virpci.h | 4 +
src/util/virscsi.c | 64 ++---
src/util/virscsi.h | 3 +
src/util/virscsivhost.c | 8 +-
src/util/virscsivhost.h | 3 +
src/util/virusb.c | 22 +-
src/util/virusb.h | 3 +
tests/vircgrouptest.c | 42 +--
41 files changed, 739 insertions(+), 1243 deletions(-)
--
1.8.3.1