[libvirt] [PATCH] qemu: unlock qemu driver before return
Daniel Veillard
veillard at redhat.com
Wed Mar 30 02:36:40 UTC 2011
On Wed, Mar 30, 2011 at 09:49:29AM +0800, Hu Tao wrote:
> ---
> src/qemu/qemu_driver.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index 104e92d..6e3edde 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2068,12 +2068,14 @@ static int qemudDomainSave(virDomainPtr dom, const char *path)
> qemuReportError(VIR_ERR_OPERATION_FAILED,
> "%s", _("Invalid save image format specified "
> "in configuration file"));
> + qemuDriverUnlock(driver);
> return -1;
> }
> if (!qemudCompressProgramAvailable(compressed)) {
> qemuReportError(VIR_ERR_OPERATION_FAILED,
> "%s", _("Compression program for image format "
> "in configuration file isn't available"));
> + qemuDriverUnlock(driver);
> return -1;
> }
> }
Whoops ! A severe problem !
Though I think the best way to do this is to "goto cleanup" instead of
returning directly
I just pushed the patch, thanks a lot !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list