Re: [libvirt] [PATCH v1 00/32] use GNU C's cleanup attribute in src/util (batch III)

2018-08-07 Thread Erik Skultety
On Sat, Jul 28, 2018 at 11:31:15PM +0530, Sukrit Bhatnagar wrote:
> This third 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.

So I went ahead an pushed most of the patches (some got tiny adjustments as I
noted in the review, I split some of them in 2 when there was a function being
defined at the same time as a usage of the VIR_DEFINE_AUTOPTR_FUNC).
Following are the patches where there were some issues that need to be worked
on (like the virBuffer leak) or there was something missing and therefore are
not pushed: 3, 6, 7, 10, 13, 14, 18, 23.

Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH v1 00/32] use GNU C's cleanup attribute in src/util (batch III)

2018-07-28 Thread Sukrit Bhatnagar
This third 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.

Sukrit Bhatnagar (32):
  util: iscsi: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: iscsi: use VIR_AUTOPTR for aggregate types
  util: netdevbridge: use VIR_AUTOFREE instead of VIR_FREE for scalar
types
  util: macaddr: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: netdev: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: netdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: netdev: use VIR_AUTOPTR for aggregate types
  util: socketaddr: define cleanup function using
VIR_DEFINE_AUTOPTR_FUNC
  util: socketaddr: use VIR_AUTOFREE instead of VIR_FREE for scalar
types
  util: socketaddr: use VIR_AUTOPTR for aggregate types
  util: netdevip: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: netdevip: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: netdevip: use VIR_AUTOPTR for aggregate types
  util: netdevmacvlan: define cleanup function using
VIR_DEFINE_AUTOPTR_FUNC
  util: netdevmacvlan: use VIR_AUTOFREE instead of VIR_FREE for scalar
types
  util: netdevmacvlan: use VIR_AUTOPTR for aggregate types
  util: netdevopenvswitch: use VIR_AUTOFREE instead of VIR_FREE for
scalar types
  util: netdevopenvswitch: use VIR_AUTOPTR for aggregate types
  util: netdevtap: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: netdevveth: use VIR_AUTOFREE instead of VIR_FREE for scalar
types
  util: netdevveth: use VIR_AUTOPTR for aggregate types
  util: netlink: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: netlink: use VIR_AUTOPTR for aggregate types
  util: numa: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: numa: use VIR_AUTOPTR for aggregate types
  util: perf: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: perf: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: pidfile: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: process: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: process: use VIR_AUTOPTR for aggregate types
  util: qemu: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: qemu: use VIR_AUTOPTR for aggregate types

 src/util/viriscsi.c |  99 --
 src/util/virmacaddr.c   |   6 +
 src/util/virmacaddr.h   |   4 +
 src/util/virnetdev.c| 412 +++-
 src/util/virnetdev.h|   4 +
 src/util/virnetdevbridge.c  |  45 ++---
 src/util/virnetdevip.c  | 157 ++-
 src/util/virnetdevip.h  |   4 +
 src/util/virnetdevmacvlan.c |  41 ++--
 src/util/virnetdevopenvswitch.c | 131 +
 src/util/virnetdevtap.c |  11 +-
 src/util/virnetdevveth.c|  33 ++--
 src/util/virnetlink.c   |  62 +++---
 src/util/virnuma.c  | 107 ---
 src/util/virperf.c  |  20 +-
 src/util/virperf.h  |   8 +-
 src/util/virpidfile.c   | 185 ++
 src/util/virprocess.c   |  68 +++
 src/util/virqemu.c  |  50 ++---
 src/util/virsocketaddr.c| 113 +--
 src/util/virsocketaddr.h|   9 +-
 21 files changed, 610 insertions(+), 959 deletions(-)

-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list