]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: unref objects in error paths
authorJim Fehlig <jfehlig@suse.com>
Wed, 24 Feb 2016 22:40:00 +0000 (15:40 -0700)
committerJim Fehlig <jfehlig@suse.com>
Thu, 25 Feb 2016 18:46:20 +0000 (11:46 -0700)
commite4f1be7eb6c9377ca5d5a408ebf5d5c6b9111eae
treefbc0f8555f27b6e3c393821756b2e27492429395
parent5430ee3aa69bf143f12830caa87ee59a30ea59b5
libxl: unref objects in error paths

libxlMakeNic opens a virConnect object and takes a reference on a
virNetwork object, but doesn't drop the references on all error
paths. Rework the function to follow the standard libvirt pattern
of using a local 'ret' variable to hold the function return value,
performing all cleanup and returning 'ret' at a 'cleanup' label.
src/libxl/libxl_conf.c