]> xenbits.xensource.com Git - libvirt.git/commit
util: firewall: use VIR_AUTOFREE instead of VIR_FREE for scalar types
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Tue, 24 Jul 2018 15:52:16 +0000 (21:22 +0530)
committerErik Skultety <eskultet@redhat.com>
Fri, 27 Jul 2018 15:21:05 +0000 (17:21 +0200)
commit469da57cd6f40e5c360dfe7916178aace7078b5f
treebe5a912d1b9620c4ae9f5f631a21fc84b9854873
parent2ad0284627ea3d6c123e0a266b9c7bb00aea4576
util: firewall: 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/virfirewall.c