[PATCH v1 00/21] use GCC's cleanup attribute in src/util

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series of patches introduces a new set of macros which help in
using GCC's __attribute__((cleanup)) in the code.

Then the patches modify 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 (21):
  add macros for implementing automatic cleanup functionality
  util: arptable: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: iohelper: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: audit: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: fcp: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: eventpoll: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: filecache: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: authconfig: define cleanup function using
    VIR_DEFINE_AUTOPTR_FUNC
  util: authconfig: remove redundant include directive
  util: authconfig: use VIR_AUTOFREE instead of VIR_FREE for scalar
    types
  util: auth: remove redundant include directive
  util: auth: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: auth: use VIR_AUTOPTR for aggregate types
  util: json: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: json: remove redundant include directive
  util: json: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: json: use VIR_AUTOPTR for aggregate types
  util: identity: use VIR_AUTOFREE instead of VIR_FREE for scalar types
  util: bitmap: define cleanup function using VIR_DEFINE_AUTOPTR_FUNC
  util: bitmap: remove redundant include directive
  util: bitmap: use VIR_AUTOPTR for aggregate types

 src/util/iohelper.c      |  4 +--
 src/util/viralloc.h      | 68 ++++++++++++++++++++++++++++++++++++++++++++++++
 src/util/virarptable.c   | 14 +++-------
 src/util/viraudit.c      |  3 +--
 src/util/virauth.c       | 61 +++++++++++++------------------------------
 src/util/virauthconfig.c | 35 +++++++++----------------
 src/util/virauthconfig.h |  3 +++
 src/util/virbitmap.c     |  8 ++----
 src/util/virbitmap.h     |  3 +++
 src/util/vireventpoll.c  |  7 ++---
 src/util/virfcp.c        | 20 +++++---------
 src/util/virfilecache.c  | 35 ++++++++-----------------
 src/util/viridentity.c   | 54 ++++++++++++++++----------------------
 src/util/virjson.c       | 45 +++++++++-----------------------
 src/util/virjson.h       |  3 +++
 15 files changed, 168 insertions(+), 195 deletions(-)

-- 
1.8.3.1

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux