]> git.ipfire.org Git - thirdparty/libvirt.git/commit
rbd: Only close RBD image if it has been opened
authorWido den Hollander <wido@widodh.nl>
Wed, 6 Jan 2016 09:25:48 +0000 (10:25 +0100)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 6 Jan 2016 12:46:17 +0000 (07:46 -0500)
commit10028a9d5843020ad58e6b6922246543a59a6d7e
tree4959cb1337843e7750bc62f7acceb0aa05ff87c5
parentb22344f3285187ee1768d6e031bc0ff20e32552d
rbd: Only close RBD image if it has been opened

It could be that we error out while the RBD image has not been
opened yet. This would cause us to call rbd_close() on pointer
which has not been initialized.

Set it to NULL by default and only close if it is not NULL.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
src/storage/storage_backend_rbd.c