]> xenbits.xensource.com Git - libvirt.git/commit
util: netdevmacvlan: use VIR_AUTOFREE instead of VIR_FREE for scalar types
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Sat, 28 Jul 2018 18:01:30 +0000 (23:31 +0530)
committerErik Skultety <eskultet@redhat.com>
Tue, 7 Aug 2018 14:29:55 +0000 (16:29 +0200)
commitb7ef069ec75e4efc1872bbcd418d08bf8736aa2f
treec3e13a10eb749b8a9abf1908eceee5b24e61fb4b
parent8214abd60ed3e21e7ec786d99336bbbd4accdfae
util: netdevmacvlan: 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/virnetdevmacvlan.c