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