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