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