]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: process: use VIR_AUTOFREE instead of VIR_FREE for scalar types
authorSukrit Bhatnagar <skrtbhtngr@gmail.com>
Sat, 28 Jul 2018 18:01:44 +0000 (23:31 +0530)
committerErik Skultety <eskultet@redhat.com>
Tue, 7 Aug 2018 14:29:56 +0000 (16:29 +0200)
commitce814ed39261b12a070b1e477df920d67333eac0
tree96251730b89859f6b06ed864266f953fa9acf7df
parentd00fc4178c77c4c095b25d615f369a9904f902f8
util: process: 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/virprocess.c