]> xenbits.xensource.com Git - libvirt.git/commit
util: file: use VIR_AUTOFREE instead of VIR_FREE for scalar types
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Fri, 13 Jul 2018 17:54:48 +0000 (23:24 +0530)
committerErik Skultety <eskultet@redhat.com>
Sat, 14 Jul 2018 15:01:30 +0000 (17:01 +0200)
commit69b937f0358ac734afb762913da586f18f53ce31
tree5a44b5e0660b5ad9fecfff1a1645fc7aef409378
parentb6d96ec80ad8fb8a94a23a96ac96675a1ae4fbd1
util: file: use VIR_AUTOFREE instead of VIR_FREE for scalar types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOFREE macro for declaring scalar variables, majority
of the VIR_FREE calls can be dropped, which in turn leads to
getting rid of most of our cleanup sections.

Signed-off-by: Sukrit Bhatnagar <skrtbhtngr@gmail.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/util/virfile.c