]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: mdev: use VIR_AUTOFREE instead of VIR_FREE for scalar types
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Tue, 24 Jul 2018 15:52:13 +0000 (21:22 +0530)
committerErik Skultety <eskultet@redhat.com>
Fri, 27 Jul 2018 15:19:24 +0000 (17:19 +0200)
commit4632e02db5603a297681420be10593310a7b6f7c
tree31548969edb3bbf6e14cba5303b6a5d42f02a83c
parent92c0d06300ff780f34b97588a2e7acfc18e51088
util: mdev: 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/virmdev.c