]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: hostdev: use VIR_AUTOPTR for aggregate types
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Tue, 24 Jul 2018 15:52:34 +0000 (21:22 +0530)
committerErik Skultety <eskultet@redhat.com>
Fri, 27 Jul 2018 15:21:25 +0000 (17:21 +0200)
commit618f6a74dacbef6fdf8c6a9c265394cde6788421
tree4d4d585306bf1ed095f020a758119a099f2e42e7
parent37cf4b3b1e40e0e2903fdcb4bdf21de13e8945bb
util: hostdev: use VIR_AUTOPTR for aggregate types

By making use of GNU C's cleanup attribute handled by the
VIR_AUTOPTR macro for declaring aggregate pointer variables,
majority of the calls to *Free functions 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/virhostdev.c