]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: Use autofree for more local variables
authorJonathon Jongsma <jjongsma@redhat.com>
Fri, 10 Jan 2020 21:51:07 +0000 (15:51 -0600)
committerErik Skultety <eskultet@redhat.com>
Thu, 23 Jan 2020 09:04:22 +0000 (10:04 +0100)
commitd7da92a9cec7d48361b9dac2c13eea93d689db6a
tree0e0507f59199d2c25dee42b73206c50b983a6892
parent153fd683681be13f380378acfc531cc3df206fd1
nodedev: Use autofree for more local variables

Simplify function logic by using g_autofree to free local variables so
that we can remove some goto statements that are used for cleanup.

Introduce a g_autoptr cleanup function for virNodeDeviceDef.

Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
src/conf/node_device_conf.h
src/node_device/node_device_driver.c